Skip to content

Commit

Permalink
remove build number from opensuse and redhat
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeiczin committed Jun 16, 2014
1 parent cb02fd4 commit e642a27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def links(self):
soup = Soup(r.text)
binaries = [x['filename'] for x in soup.findAll('binary')]
for binary in binaries:
if any(ext in binary for ext in ['i386.deb', 'amd64.deb','i586.rpm', 'x86_64.rpm']):
if any(ext in binary for ext in ['i386.deb', 'amd64.deb', 'i586.rpm', 'i686.rpm', 'x86_64.rpm']):
link = 'http://download.opensuse.org/repositories/home:/tmeiczin:/opendcp'
link = '%s/%s/%s/%s' % (link, repo, self._arch(arch, binary), binary)
md5 = self._get_md5(link)
Expand Down Expand Up @@ -167,6 +167,10 @@ def md5_checksum(self, filename, md5):
def replace_os(self, filename):
filename = filename.replace('centos_centos-6', 'centos_6')
filename = filename.replace('redhat_rhel-6', 'rhel_6')
if 'opensuse' in filename:
filename = re.sub(r'(opendcp-\d+.\d+.\d+-\w+_\d+.\d+)(-\d+.\d+)', r'\1', filename)
else:
filename = re.sub(r'(opendcp-\d+.\d+.\d+-\w+_\d+)(-\d+.\d+)', r'\1', filename)

return filename

Expand Down

0 comments on commit e642a27

Please sign in to comment.