fix(ci): read release version from Cargo.toml, not cargo metadata (ADR-0054)
ci / gate (push) Successful in 3m12s
release / test (push) Successful in 2m44s
release / build (aarch64-pc-windows-gnullvm) (push) Successful in 3m56s
release / build (aarch64-unknown-linux-musl) (push) Successful in 4m18s
release / build (x86_64-pc-windows-gnu) (push) Successful in 4m39s
release / build (x86_64-unknown-linux-musl) (push) Successful in 3m50s
ci / gate (push) Successful in 3m12s
release / test (push) Successful in 2m44s
release / build (aarch64-pc-windows-gnullvm) (push) Successful in 3m56s
release / build (aarch64-unknown-linux-musl) (push) Successful in 4m18s
release / build (x86_64-pc-windows-gnu) (push) Successful in 4m39s
release / build (x86_64-unknown-linux-musl) (push) Successful in 3m50s
The ADR-0054 version guard piped `nix develop -c cargo metadata` to node, but the flake devShell prints a banner to stdout — corrupting the JSON pipe, so the guard aborted under `set -e` and the v0.2.0 release failed there (before building anything). Replace it with a toolchain-free `grep -m1 '^version = ' Cargo.toml` (the anchor excludes dependency `version =` keys). No real version mismatch occurred — the tagged commit has version 0.2.0.
This commit is contained in:
@@ -37,7 +37,9 @@ version I'm running" — that drift is a correctness problem.
|
||||
one rendered string and one version source.
|
||||
|
||||
3. **Release-CI discipline.** `release.yaml`'s pre-build `test` job gains a
|
||||
**version guard**: it parses `CARGO_PKG_VERSION` from `cargo metadata`
|
||||
**version guard**: it reads the `[package]` version directly from
|
||||
`Cargo.toml` (`grep -m1 '^version = '` — toolchain-free; an earlier
|
||||
`cargo metadata | node` form broke on the flake devShell's stdout banner)
|
||||
and **fails the release** unless the pushed tag equals `v<that version>`.
|
||||
So `--version`, the release name, and the downloaded asset are always in
|
||||
lockstep — enforced by the machine, not by memory.
|
||||
|
||||
Reference in New Issue
Block a user