1
0
forked from me/IronOS

Merge pull request #596 from GeminiServer/PR-git-hash-fix-on-tags

bugfix - git hash returns tags (if set) instead the short hash
This commit is contained in:
Ben V. Brown
2020-03-21 12:13:30 +11:00
committed by GitHub

View File

@@ -503,7 +503,8 @@ def readVersion():
if line:
version = line[0]
try: version += "."+ subprocess.check_output(
["git","describe", "--always"]).strip().decode('ascii').upper()
["git","rev-parse", "--short=7", "HEAD"]).strip().decode('ascii').upper()
# --short=7: the shorted hash with 7 digits. Increase/decrease if needed!
except OSError: version += " git"
finally:
if version_file: