diff --git a/src/centpkg/__init__.py b/src/centpkg/__init__.py index c161d73..d52b659 100644 --- a/src/centpkg/__init__.py +++ b/src/centpkg/__init__.py @@ -49,10 +49,12 @@ class DistGitDirectory(object): rhelbranchre = r'rhel-(?P\d+)\.(?P\d+)(?:\.(?P\d+))?' sigtobranchre = r'c(?P\d+[s]?)-sig-(?P\w+)-?(?P\w+)?-?(?P\w+)?' distrobranchre = r'c(?P\d+)-?(?P\w+)?' + javabranchre = r'openjdk-portable-centos-(?P\d+)' oldbranchre = r'(?P\w+)(?P\d)' rhelmatch = re.search(rhelbranchre, branchtext) sigmatch = re.match(sigtobranchre, branchtext) distromatch = re.match(distrobranchre, branchtext) + javamatch = re.match(javabranchre, branchtext) oldbranchmatch = re.match(oldbranchre, branchtext) if rhelmatch: gd = rhelmatch.groupdict() @@ -80,6 +82,11 @@ class DistGitDirectory(object): if gd['projectname'] != 'common': self.projectname = gd['projectname'] + elif javamatch: + gd = javamatch.groupdict() + self.distrobranch = True + self.signame = 'centos' + self.centosversion = gd['centosversion'] elif oldbranchmatch: warnings.warn("This branch is deprecated and will be removed soon", DeprecationWarning)