--version now displays the correct (new-form) version number
This commit is contained in:
@@ -69,10 +69,17 @@ def findGitVersion():
|
||||
line = line.split('-', 1)[1]
|
||||
if line.startswith('v'):
|
||||
line = line[1:]
|
||||
# turn 0.1.2-50-somehash into 0.1.2-50
|
||||
# and 0.1.3 into 0.1.3
|
||||
line = '-'.join(line.split('-', 2)[:2])
|
||||
return line.strip()
|
||||
# turn 0.1.0-50-somehash into 0.1.50
|
||||
# and 0.1.0 into 0.1.0
|
||||
line = line.strip().replace('-', '.').split('.')
|
||||
if len(line) == 5:
|
||||
del line[4]
|
||||
del line[2]
|
||||
else:
|
||||
assert len(line) == 3
|
||||
line[2] = '0'
|
||||
line = '.'.join(line)
|
||||
return line
|
||||
except Exception:
|
||||
try:
|
||||
import overviewer_version
|
||||
|
||||
Reference in New Issue
Block a user