Repository navigation
Commit 79f2dd9
fix(release): make the version stamp work on macOS and RPM
The stamp shipped in #83 broke two of the seven build jobs.
macOS — `sed: 1: "Cargo.toml`. Two separate GNU-isms, only one of which was
obvious: BSD sed reads the argument after -i as a backup suffix, and the
`0,/re/` address range used to match only the first occurrence is a GNU
extension BSD rejects outright. Fixing the first alone would still have failed.
Uses awk instead, which behaves the same on both.
RPM — `invalid version "0.1.0-rc.10": contains invalid character (allowed:
alphanumeric, '.', '_', '+', '%', '{', '}', '~', '^')`. RPM forbids '-' in a
version, but cargo requires semver. The tool's own error names the way out: '+'
is legal in RPM, and semver allows it as build metadata. So the pre-release
marker becomes +rc.N rather than -rc.N, which cargo, dpkg and rpm all accept.
'~' would sort better for rpm and deb, but cargo rejects it.
This is the same failure I made earlier today with BSD grep in
non_utf8_argv_test: verified against GNU tooling on Windows, shipped to a macOS
runner. Checked explicitly for it this time — the awk rewrite was prompted by
noticing the 0,/re/ range would fail on BSD even after the -i fix.
Verified:
- all five tag forms derive correctly
- cargo metadata reports 0.1.0+rc.10
- 0.1.0+rc.10 contains only characters rpm's error message lists as legal
- the stamp rewrites line 3 only; clap/serde/serde_json versions intact
- the stable path yields a bare 0.1.0
- a malformed tag is rejected rather than corrupting the manifest
Still unverified locally: the .deb/.rpm filenames, which need cargo-deb and
cargo-generate-rpm on Linux, and BSD sed/awk behaviour itself. The next RC's
published assets and the macOS job are the checks.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent aa0bc39 commit 79f2dd9
1 file changed
Lines changed: 29 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
25 | 34 | | |
26 | | - | |
| 35 | + | |
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
| |||
38 | 47 | | |
39 | 48 | | |
40 | 49 | | |
41 | | - | |
| 50 | + | |
42 | 51 | | |
43 | 52 | | |
44 | | - | |
| 53 | + | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
| |||
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
56 | | - | |
| 65 | + | |
57 | 66 | | |
58 | 67 | | |
59 | 68 | | |
| |||
62 | 71 | | |
63 | 72 | | |
64 | 73 | | |
65 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
66 | 88 | | |
67 | 89 | | |
68 | 90 | | |
| |||
0 commit comments