Commit ffb628c
authored
fix(ci): sync Cargo.toml version before native binary build (#538)
* fix(ci): sync Cargo.toml version before native binary build
The build-native job ran in parallel with compute-version, so the Rust
crate was compiled with whatever stale version was in Cargo.toml rather
than the release version. This caused `codegraph info` to report
"binary built as 3.2.0" even on a 3.3.0 release.
Make build-native depend on compute-version and update Cargo.toml
before `cargo build` so env!("CARGO_PKG_VERSION") returns the correct
version.
* fix: guard against empty VERSION in Cargo.toml sync step (#538)
Add validation that $VERSION is non-empty before writing to Cargo.toml.
Prevents silently writing an empty version string if compute-version
output is missing.
* fix: scope awk version replacement to first occurrence only (#538)
Use an early-exit flag so only the first ^version = line in Cargo.toml
is replaced. Prevents silently corrupting the file if a second
version = line appears in a different TOML section.1 parent 8e78e62 commit ffb628c
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
180 | 190 | | |
181 | 191 | | |
182 | 192 | | |
| |||
0 commit comments