Make bin/release resumable - #28
Merged
Merged
Conversation
A release that dies partway through (CI, a network blip, an expired RubyGems login) previously had to be finished by hand, because re-running the script re-ran steps that had already succeeded and failed on them. Each step now skips itself when it's already done: - the version bump PR, when version.rb already has the version - `git tag` and `git push origin <tag>`, checked separately - `gem push`, when RubyGems already serves the version - `gh release create`, when the release exists Two bugs fixed along the way: - `git branch -d` would have failed after the squash merge, since the branch isn't reachable from main, killing the script before tagging. Now `-D`. - RubyGems sends `cache-control: max-age=60`, so a re-run shortly after a push could read a cached 404 and try to push again. The check sends `no-cache`, and a push that fails only because the version is already published no longer aborts the release. The publish step also pauses before pushing, so there's a chance to `gem signin` when MFA has expired. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011yBbeP6HZZkEwWK4jiikTr
sethherr
added a commit
that referenced
this pull request
Aug 5, 2026
Also pull in a small update to `bin/release` that was missed in #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A release that dies partway through (CI, a network blip, an expired RubyGems login) previously had to be finished by hand, because re-running the script re-ran steps that had already succeeded and failed on them.
Each step now skips itself when it's already done:
git tagandgit push origin <tag>, checked separatelygem push, when RubyGems already serves the versiongh release create, when the release existsTwo bugs fixed along the way:
git branch -dwould have failed after the squash merge, since the branch isn't reachable from main, killing the script before tagging. Now-D.cache-control: max-age=60, so a re-run shortly after a push could read a cached 404 and try to push again. The check sendsno-cache, and a push that fails only because the version is already published no longer aborts the release.The publish step also pauses before pushing, so there's a chance to
gem signinwhen MFA has expired.