From e642a273a19437910dc4543f78e6da93a3d86134 Mon Sep 17 00:00:00 2001 From: Terrence Meiczinger Date: Sun, 15 Jun 2014 23:35:47 -0400 Subject: [PATCH] remove build number from opensuse and redhat --- scripts/publish.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/publish.py b/scripts/publish.py index cca14cb..5759c8b 100755 --- a/scripts/publish.py +++ b/scripts/publish.py @@ -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) @@ -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