Commit 42e223c
fix(build): keep git-describe's suffix so dev builds can't impersonate a release
Addresses the PR #24 review. Both comments were real; the first turned out to
sit on top of a latent bug worth more than the wording fix it asked for.
1. Regex vs stated intent. The comment claimed "a plain dotted version" while
the regex allowed a -suffix. Rather than tighten the regex as suggested, the
suffix is now REQUIRED behaviour and the comment says so — because dropping
--abbrev=0 from `git describe` is the actual fix:
at the tag (CI release): v0.8.0 -> stamps 0.8.0
off the tag (dev build): v0.8.0-1-g404ef20 -> stamps 0.8.0-1-g404ef20
With --abbrev=0 a dev build five commits past a release stamped a bare
"0.8.0" and impersonated it in the UI — the exact class of confusion this PR
exists to fix. Tightening to X.Y.Z would have locked that in, or failed dev
builds outright once the suffix appeared. Junk ("v0.8", a branch name, an
empty describe) still exits 1 and fails the build.
2. %cI documented as "authored". The code was right and the prose was wrong, so
the prose changed: "Released" means when the build's commit LANDED, and a
cherry-picked commit's author date can predate the release by weeks — the
stability %aI offers is stability around the wrong instant. Now stated
explicitly in the script header, build-macos.sh, and the product.ts doc
comment. (On every release commit to date the two are identical, since they
are GitHub merge commits.)
Verified: exact-tag input stamps 0.8.0; describe-suffix input keeps the suffix;
"v0.8" / a branch name / empty all exit 1; typecheck-client exit 0; the patch is
still 14 entries with the original 11 byte-identical, no de-brand contamination,
and reverse-applies cleanly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 72383a0 commit 42e223c
3 files changed
Lines changed: 25 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
| 294 | + | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
| 297 | + | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
313 | 315 | | |
314 | 316 | | |
315 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
40 | 48 | | |
41 | 49 | | |
42 | | - | |
| 50 | + | |
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
| |||
0 commit comments