build: adopt the snap version from Cargo.toml

The version: key in snapcraft.yaml was a second number to bump by
hand, and between releases it read whatever it was left at. The ecrou
part now sets its version from [workspace.package] at pull time —
the same value clap reports with --version — so Cargo.toml is the
only place a version lives, and the release workflow stamps only
that. A missed match fails the pack loudly.
This commit is contained in:
vhaudiquet committed 2026-10-30 16:19:10 +01:00
1 parent a021df7d72
commit 2ac01f992a
2 files changed
+13 -3

No files matched your search

+2 -2
View File
@@ -51,8 +51,8 @@ jobs:
run: |
v="${GITHUB_REF_NAME#v}"
sed -i "s/^version = \".*\"/version = \"$v\"/" Cargo.toml
sed -i "s/^version: \".*\"/version: \"$v\"/" snap/snapcraft.yaml
grep -H '^version' Cargo.toml snap/snapcraft.yaml
# The snap adopts this version from Cargo.toml at pull time.
grep -H '^version' Cargo.toml
- uses: snapcore/action-build@v1
id: build