From dc581acc5421f73d9436a4d86ef815d73e878b6d Mon Sep 17 00:00:00 2001 From: makamys Date: Wed, 13 Jul 2022 15:29:22 +0200 Subject: buildscript: Fix subprocess invocation --- publish/get_version.py | 2 +- publish/update_updatejson.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'publish') diff --git a/publish/get_version.py b/publish/get_version.py index 0c19c2d..32f27ce 100644 --- a/publish/get_version.py +++ b/publish/get_version.py @@ -9,6 +9,6 @@ if os.path.exists(versionPath): with open(versionPath, "r", encoding="utf8") as fp: ver = fp.read() else: - ver = subprocess.run("git describe --tags --dirty", capture_output=True, text=True).stdout or "UNKNOWN-" + subprocess.run("git describe --always --dirty", capture_output=True, text=True).stdout or "UNKNOWN" + ver = subprocess.run(["git", "describe", "--tags", "--dirty"], capture_output=True, text=True).stdout or "UNKNOWN-" + subprocess.run(["git", "describe", "--always", "--dirty"], capture_output=True, text=True).stdout or "UNKNOWN" print(ver.strip()) diff --git a/publish/update_updatejson.py b/publish/update_updatejson.py index b381729..d9af683 100644 --- a/publish/update_updatejson.py +++ b/publish/update_updatejson.py @@ -7,7 +7,7 @@ jsonPath = "../updatejson/update.json" fullFormat = "updateJsonFullVersionFormat=true" in open("gradle.properties", "r", encoding="utf8").read() data = json.load(open(jsonPath, "r", encoding="utf8")) -ver = subprocess.run("python3 get_version.py", capture_output=True, text=True).stdout.strip() +ver = subprocess.run(["python3", "get_version.py"], capture_output=True, text=True).stdout.strip() for gameVer in json.load(open("gameVersions.json", "r")).keys(): modVer = "{}".format(ver) if not fullFormat else "{}-{}".format(gameVer, ver) -- cgit