setup: also consider lightweight tags to create version number

This commit is contained in:
Frédéric Péters 2017-08-27 09:40:26 +02:00
parent 76f2058c33
commit d05d6603ff
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ def get_version():
with open('VERSION', 'r') as v:
return v.read()
if os.path.exists('.git'):
p = subprocess.Popen(['git', 'describe', '--dirty', '--match=v*'], stdout=subprocess.PIPE,
p = subprocess.Popen(['git', 'describe', '--dirty', '--tags', '--match=v*'], stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
result = p.communicate()[0]
if p.returncode == 0: