fix: keep automatic release versions stable across retries [skip release]#29
Summary
Closes #25. A retried automatic release reuses the version already tagged on its own commit instead of picking the next unused patch.
diff
| 1 | -version = nextReleaseVersion(package.version, allTags) |
| 2 | +tagAtHead = highest v* tag pointing at HEAD |
| 3 | +version = tagAtHead > package.version ? tagAtHead : nextReleaseVersion(package.version, allTags) |
set-build-version.mjs validates with the same rule and asserts the build ref equals HEAD. No workflow change; manual tag matching and release integrity gates are unchanged.
Evidence
- Before:
scripts/set-build-version.test.mjs7 pass, 5 fail (full-run and build-job retries, lightweight and annotated tags, in temporary repos). - After: 12/12; release script tests 53 pass, 1 skipped;
npm testpasses.
Not verified: a hosted release retry.
Merge Danger
Door: two-way
Blast Radius: releases
View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.
Added 1 commit
- fix: keep automatic release versions stable across retries [skip release]1cf1a45