aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-08-27 18:19:22 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-08-27 18:19:22 +0200
commitf3ade2c783fc05caa918e39e811918cfe9a441a6 (patch)
tree4012790e87345ca79e67c4df66a2e35ca63828f3
parentf01751c3a9ada9ce3495b58cb4e0ce93a95be427 (diff)
downloadFlightCore-f3ade2c783fc05caa918e39e811918cfe9a441a6.tar.gz
FlightCore-f3ade2c783fc05caa918e39e811918cfe9a441a6.zip
Check version numbers in CI
-rw-r--r--.github/workflows/push-test.yml11
-rw-r--r--scripts/check_version_numbers.py15
2 files changed, 26 insertions, 0 deletions
diff --git a/.github/workflows/push-test.yml b/.github/workflows/push-test.yml
index acbe18ed..6e424523 100644
--- a/.github/workflows/push-test.yml
+++ b/.github/workflows/push-test.yml
@@ -2,6 +2,17 @@ name: "test-on-push"
on: [push, pull_request]
jobs:
+ # Ensure version numbers in various places match up
+ ensure-same-version:
+ runs-on: ubuntu-20.04
+ steps:
+ - name: install dependencies
+ run: |
+ pip install toml
+ - name: Run check
+ run: |
+ python3 scripts/check_version_numbers.py
+
test-tauri:
strategy:
fail-fast: false
diff --git a/scripts/check_version_numbers.py b/scripts/check_version_numbers.py
new file mode 100644
index 00000000..3a09a9ee
--- /dev/null
+++ b/scripts/check_version_numbers.py
@@ -0,0 +1,15 @@
+# %%
+""""Ensure that version numbers between `tauri.conf.json`, `cargo.toml`, and GitHub release are the same"""
+import json
+import toml
+
+with open("src-tauri/tauri.conf.json", "rt") as f:
+ tauri_conf_json = json.load(f)
+
+with open("src-tauri/Cargo.toml", "rt") as f:
+ Cargo_toml = toml.load(f)
+
+tauri_conf_json["package"]["version"]
+Cargo_toml["package"]["version"]
+
+assert(tauri_conf_json["package"]["version"] == Cargo_toml["package"]["version"])