Make appveyor able to inject git commit into version

This commit is contained in:
Vasily
2019-04-19 22:29:20 +02:00
parent a74f0cad49
commit 9303d93f27
2 changed files with 14 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
from sys import argv
from os import path
def get_version_string():
dir_path = path.dirname(path.realpath(__file__))
with open(dir_path + "/compile_version_string.txt", "r") as file:
contents = file.readline()
return contents.strip('"')
if __name__ == "__main__":
current_version = get_version_string()
new_version = current_version + "-" + argv[1]
print("\"" + new_version + "\"")