1
0
forked from me/IronOS

bugfix - git hash returns tags (if set) instead the short hash

using "git rev-parse --short=7 HEAD" to be sure we always get the commit hash.
This commit is contained in:
GeminiServer
2020-03-21 01:27:55 +01:00
parent bccaea746c
commit a5a21a8678

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: