When working out what version prefix to use from a revision - if there are no dots (but there are numbers) default to 1.25000.0.
This commit is contained in:
parent
d296da9e8d
commit
34d5e771d7
1 changed files with 8 additions and 0 deletions
|
|
@ -76,6 +76,7 @@ def getVersionPrefix(sourcebranch):
|
|||
|
||||
defaultversionprefix = "1.30000.0."
|
||||
mastertypeversionprefix = "1.20000.0."
|
||||
thirdpartyversionprefix = "1.25000.0."
|
||||
splits = sourcebranch.split('/')
|
||||
if len(splits) < 1:
|
||||
print("Source branch name is invalid. Defaulting to: {0}".format(defaultversionprefix))
|
||||
|
|
@ -88,9 +89,16 @@ def getVersionPrefix(sourcebranch):
|
|||
|
||||
splits2 = re.split(r'(\d+)', sourcebranch)
|
||||
splits = []
|
||||
hasdot = False
|
||||
for split in splits2:
|
||||
if split.isdigit():
|
||||
splits.append(split)
|
||||
if split == ".":
|
||||
hasdot = True
|
||||
|
||||
if not hasdot:
|
||||
print("Source branch name has not dots in it (eg. 1.9.2). Defaulting to: {0}".format(thirdpartyversionprefix))
|
||||
return thirdpartyversionprefix
|
||||
|
||||
versionprefix = ""
|
||||
if len(splits) < 1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue