Allow openjdk branches

This commit is contained in:
Troy Dawson 2024-02-19 14:58:27 -08:00
parent b66e8a61f5
commit 0fb26c5d52

View file

@ -49,10 +49,12 @@ class DistGitDirectory(object):
rhelbranchre = r'rhel-(?P<major>\d+)\.(?P<minor>\d+)(?:\.(?P<appstream>\d+))?'
sigtobranchre = r'c(?P<centosversion>\d+[s]?)-sig-(?P<signame>\w+)-?(?P<projectname>\w+)?-?(?P<releasename>\w+)?'
distrobranchre = r'c(?P<centosversion>\d+)-?(?P<projectname>\w+)?'
javabranchre = r'openjdk-portable-centos-(?P<centosversion>\d+)'
oldbranchre = r'(?P<signame>\w+)(?P<centosversion>\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)