diff options
author | makamys <makamys@outlook.com> | 2022-07-13 15:29:22 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-07-13 15:29:22 +0200 |
commit | dc581acc5421f73d9436a4d86ef815d73e878b6d (patch) | |
tree | 74af470776e164047b46491ee5057330405a2b87 /publish | |
parent | bcb3faab5a369c1a2ebd09584707e057591b9aa3 (diff) | |
download | Neodymium-dc581acc5421f73d9436a4d86ef815d73e878b6d.tar.gz Neodymium-dc581acc5421f73d9436a4d86ef815d73e878b6d.tar.bz2 Neodymium-dc581acc5421f73d9436a4d86ef815d73e878b6d.zip |
buildscript: Fix subprocess invocation
Diffstat (limited to 'publish')
-rw-r--r-- | publish/get_version.py | 2 | ||||
-rw-r--r-- | publish/update_updatejson.py | 2 |
2 files changed, 2 insertions, 2 deletions
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) |