Skip to content

Commit

Permalink
bindings: make sure all versions are the same
Browse files Browse the repository at this point in the history
Signed-off-by: Tristram Gräbener <[email protected]>
  • Loading branch information
Tristramg committed Oct 11, 2024
1 parent 57b44fb commit 1a15c48
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,10 @@ jobs:
- uses: actions/checkout@v4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v4

version:
name: Check binding's versions
runs-on: ubuntu-latest
steps:
- name: Check versions
run: python check_versions.py
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "liblrs"
version = "0.1.1"
version = "0.2.0"
edition = "2021"
description = "Library to manipulate linear referencing systems"
license = "MIT"
Expand Down
21 changes: 21 additions & 0 deletions check_versions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import sys
import tomllib
import json

rust = tomllib.load(open("Cargo.toml", "rb"))
python = tomllib.load(open("python/Cargo.toml", "rb"))
wasm = json.load(open("wasm/package.json", "rb"))

rust_version = rust["package"]["version"]
python_version = python["package"]["version"]
wasm_version = wasm["version"]
if rust_version == python_version == wasm_version:
print("all versions are the same")
sys.exit(0)
else:
print(f"version mismatch\n"
f" rust: {rust_version}\n"
f" python: {python_version}\n"
f" wasm: {wasm_version}\n")

sys.exit(1)
2 changes: 1 addition & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "liblrs_python"
description = "Python bindings for liblrs: a library to work with linear referencing systems"
version = "0.1.7"
version = "0.2.1"
edition = "2021"
license = "MIT"
repository = "https://github.com/osrd-project/liblrs/"
Expand Down
2 changes: 1 addition & 1 deletion wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"pmtiles": "^3.0.5"
},
"name": "liblrs",
"version": "0.1.0",
"version": "0.2.0",
"repository": {
"type": "git",
"url": "https://github.com/osrd-project/liblrs/"
Expand Down

0 comments on commit 1a15c48

Please sign in to comment.