Skip to content

chore: make release.sh the only release entrypoint - #65

Merged
charliewwdev merged 1 commit into
mainfrom
chore/single-release-entrypoint
Sep 1, 2026
Merged

chore: make release.sh the only release entrypoint#65
charliewwdev merged 1 commit into
mainfrom
chore/single-release-entrypoint

Conversation

@charliewwdev

Copy link
Copy Markdown
Member

Follow-up to #64. Fixing release.sh alone was not enough — three other scripts and two documents could still reproduce the incident.

Summary

Four scripts could cut a release. Three of them bypassed the correct flow, contradicting the project's own rule in CLAUDE.md:

ALWAYS use the release script. NEVER bump versions or commit/tag/push manually.

All three were last touched in February 2026 and are referenced by no workflow.

removed why
scripts/publish.sh Hardcoded v0.2.24 against a current 0.9.36, and ran flutter pub publish directly — able to ship the working tree to pub.dev with no tag, no version sync and no CI. Output was Chinese, against the English-only rule.
scripts/bump_version.dart Printed git push origin main --tags as step 4 — the exact non-atomic push that stranded v0.9.24 and v0.9.36.
scripts/bump_version.sh Updated 5 version files where release.sh updates 16, so using it left versions inconsistent across packages.

The documented footgun

The same command was written into two docs, so following either by hand hit the bug even with release.sh fixed:

  • CLAUDE.mdManual Release Steps
  • .github/RELEASE_GUIDE.mdQuick Manual Release

Both now:

git fetch origin main
git rev-parse main origin/main   # must print the same SHA twice
...
git push --atomic origin main refs/tags/vX.Y.Z

with a comment explaining that --tags lets a tag through even when the branch update is rejected.

Verification

  • Full-repo reference scan before deleting — no workflow, script or live doc referenced any of the three
  • Post-delete scan — only CHANGELOG.md:1513 and docs/CLEANUP_SUMMARY.md:15 still mention publish.sh, both historical records, left as they are
  • git push origin main --tags no longer appears in any doc or script (the remaining hit is scripts/release.sh, fixed by fix(release): keep the tag on main and push it atomically #64 on its own branch)

Note

docs/CLEANUP_SUMMARY.md is a February snapshot that is already inaccurate in other ways — it places publish.sh, install.sh and PUBLISHING.md at the repo root, none of which is true now. Retiring it is worth a separate decision, so I left it alone.

🤖 Generated with Claude Code

Four scripts could cut a release, three of them able to bypass the
correct flow. That contradicts the project's own rule ("ALWAYS use the
release script. NEVER bump versions or commit/tag/push manually") and is
the soil the v0.9.24 and v0.9.36 orphaned-tag incidents grew in.

Removed, all untouched since February and referenced by no workflow:

- publish.sh — hardcoded v0.2.24 against a current 0.9.36 and ran
  `flutter pub publish` directly, so it could ship the working tree to
  pub.dev with no tag, no version sync and no CI. Output was Chinese,
  against the English-only rule.
- bump_version.dart — printed `git push origin main --tags` as step 4,
  reproducing the exact non-atomic push that stranded two releases.
- bump_version.sh — updated 5 version files where release.sh updates 16,
  so using it left the versions inconsistent.

The same push command was documented in CLAUDE.md and RELEASE_GUIDE.md,
so following either by hand hit the bug even with the script fixed. Both
now verify main matches origin/main first and push with --atomic naming
the single tag.

Remaining mentions in CHANGELOG.md and docs/CLEANUP_SUMMARY.md are
historical records and are left as they are.
@charliewwdev
charliewwdev merged commit 5668148 into main Sep 1, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant