correction for setup version string detection
This commit is contained in:
parent
8f638776b3
commit
2357cb427f
@ -360,12 +360,9 @@ def getGitVersion(tagPrefix):
|
|||||||
|
|
||||||
# Find last tag matching "tagPrefix.*"
|
# Find last tag matching "tagPrefix.*"
|
||||||
tagNames = check_output(['git', 'tag'], universal_newlines=True).strip().split('\n')
|
tagNames = check_output(['git', 'tag'], universal_newlines=True).strip().split('\n')
|
||||||
while True:
|
tagNames = [x for x in tagNames if re.match(tagPrefix + r'\d+\.\d+\..*', x)]
|
||||||
if len(tagNames) == 0:
|
tagNames.sort(key=lambda s: map(int, s[len(tagPrefix):].split('.')))
|
||||||
raise Exception("Could not determine last tagged version.")
|
lastTagName = tagNames[-1]
|
||||||
lastTagName = tagNames.pop()
|
|
||||||
if re.match(tagPrefix+r'\d+\.\d+.*', lastTagName):
|
|
||||||
break
|
|
||||||
gitVersion = lastTagName.replace(tagPrefix, '')
|
gitVersion = lastTagName.replace(tagPrefix, '')
|
||||||
|
|
||||||
# is this commit an unchanged checkout of the last tagged version?
|
# is this commit an unchanged checkout of the last tagged version?
|
||||||
|
Loading…
Reference in New Issue
Block a user