Allow using non-annotated tags for version

This commit is contained in:
Sonny Bakker 2020-08-04 22:30:17 +02:00
parent 6fb848d90e
commit aff108d7fc

View file

@ -7,7 +7,9 @@ def get_current_version():
return os.environ["VERSION"]
try:
output = subprocess.check_output(["git", "describe"], universal_newlines=True)
output = subprocess.check_output(
["git", "describe", "--tags"], universal_newlines=True
)
return output.strip()
except (subprocess.CalledProcessError, OSError):
return ""