Commit 2357cb42 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

correction for setup version string detection

parent 8f638776
......@@ -360,12 +360,9 @@ def getGitVersion(tagPrefix):
# Find last tag matching "tagPrefix.*"
tagNames = check_output(['git', 'tag'], universal_newlines=True).strip().split('\n')
while True:
if len(tagNames) == 0:
raise Exception("Could not determine last tagged version.")
lastTagName = tagNames.pop()
if re.match(tagPrefix+r'\d+\.\d+.*', lastTagName):
tagNames = [x for x in tagNames if re.match(tagPrefix + r'\d+\.\d+\..*', x)]
tagNames.sort(key=lambda s: map(int, s[len(tagPrefix):].split('.')))
lastTagName = tagNames[-1]
gitVersion = lastTagName.replace(tagPrefix, '')
# is this commit an unchanged checkout of the last tagged version?
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment