diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-08-27 18:33:16 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-08-27 18:33:16 +0200 |
commit | 06b2bd82f9c04f4882cffbc5187fbd3043468d3d (patch) | |
tree | 90e3ed0c0139a94ee36cb8f45dea0b0f9b24fb17 | |
parent | 534d40be359e414f3d1dca6051cf8a1661e01555 (diff) | |
download | FlightCore-06b2bd82f9c04f4882cffbc5187fbd3043468d3d.tar.gz FlightCore-06b2bd82f9c04f4882cffbc5187fbd3043468d3d.zip |
Check release tag additionally on release
-rw-r--r-- | scripts/check_version_numbers.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/check_version_numbers.py b/scripts/check_version_numbers.py index 3a09a9ee..4b8d0fe8 100644 --- a/scripts/check_version_numbers.py +++ b/scripts/check_version_numbers.py @@ -2,6 +2,7 @@ """"Ensure that version numbers between `tauri.conf.json`, `cargo.toml`, and GitHub release are the same""" import json import toml +import sys with open("src-tauri/tauri.conf.json", "rt") as f: tauri_conf_json = json.load(f) @@ -9,7 +10,15 @@ with open("src-tauri/tauri.conf.json", "rt") as f: with open("src-tauri/Cargo.toml", "rt") as f: Cargo_toml = toml.load(f) -tauri_conf_json["package"]["version"] -Cargo_toml["package"]["version"] +tauri_conf_json_version = tauri_conf_json["package"]["version"] +Cargo_toml_version = Cargo_toml["package"]["version"] -assert(tauri_conf_json["package"]["version"] == Cargo_toml["package"]["version"]) +# Ensure same +assert(tauri_conf_json_version == Cargo_toml_version) + +# Check release tag additionally if release +if "--release" in sys.argv: + print("TODO") + release_tag = sys.argv[2] + print(release_tag) + assert(release_tag == f"v{tauri_conf_json_version}") |