fix(release): guard public install/version snippets (#3767)#3779
Conversation
`prepare-release.sh` and `check-versions.sh` only updated/guarded README
`--tag vX.Y.Z` examples, so the user-facing "verify your install" lines
(`codewhale --version # X.Y.Z`) and the docs/INSTALL.md npm-wrapper publish
pointer could go stale while the release gate still reported green. On the
0.8.66 candidate, docs/INSTALL.md still said 0.8.65 while check-versions passed.
- `prepare-release.sh` now bumps `codewhale --version # <version>` across
README*.md and docs/INSTALL.md, and the docs/INSTALL.md "wrapper is published
at vX.Y.Z" sentence (the v0.8.56 minimum-wrapper floor is preserved).
- `check-versions.sh` now fails when any of those snippets drift from the
workspace version. Narrowly scoped to those two snippet shapes to avoid
flagging unrelated historical prose ("as of vX").
Fixes #3767
|
Claude finished @Hmbown's task in 1m 58s —— View job Code Review — PR #3779
SummarySolid, narrowly scoped fix for a real drift failure mode. The Findings1. stale_wrapper_pointer="$(grep -nE -- "wrapper is published at" docs/INSTALL.md \
| grep -E -- "v[0-9]+\.[0-9]+\.[0-9]+" \
| grep -v -- "v${workspace_version}" || true)"
# The publish pointer can wrap onto the next line; also scan the line after the lead-in.
wrapper_pointer_version="$(grep -A1 -E -- "wrapper is published at" docs/INSTALL.md \
| grep -oE -- "v[0-9]+\.[0-9]+\.[0-9]+" | head -n1 || true)"
if [[ -n "${wrapper_pointer_version}" && ... ]]; then
The version is on the next line, so 2. No file-existence guard before the wrapper pointer checks ( The Good choices
Verdict: One real issue (dead variable that would also silently never fire if it were used). Everything else is correct. The fix is a one-line deletion in |
Summary
Closes #3767.
prepare-release.sh/check-versions.shonly updated/guarded README--tag vX.Y.Zexamples, so the user-facingcodewhale --version # X.Y.Zlines and thedocs/INSTALL.mdnpm-wrapper publish pointer could drift while the gate stayed green (on the 0.8.66 candidate, INSTALL.md still said 0.8.65 whilecheck-versions.shpassed).Changes
prepare-release.shnow bumpscodewhale --version # <version>acrossREADME*.md+docs/INSTALL.md, and thedocs/INSTALL.md"wrapper is published at vX.Y.Z" sentence. Thev0.8.56minimum-wrapper floor is preserved.check-versions.shnow fails when any of those snippets drift from the workspace version. Narrowly scoped to those two snippet shapes to avoid flagging unrelated historical prose (e.g. "as of vX").Validation (on this branch @ main 0.8.65)
./scripts/release/check-versions.sh→Version state OK, exit 0.--versioncomment →::error:: ... not on 0.8.65, exit 1; reverted.prepare-release.shbump regexes unit-checked for the next version (and preserve the v0.8.56 floor).Acceptance criteria
prepare-release.shupdates README + INSTALL.md--versioncommentsprepare-release.shupdates the INSTALL.md wrapper-published-at sentencecheck-versions.shfails when those snippets drift