Skip to content

Make bin/release resumable - #28

Merged
sethherr merged 1 commit into
mainfrom
make-bin-release-resumable
Aug 5, 2026
Merged

Make bin/release resumable#28
sethherr merged 1 commit into
mainfrom
make-bin-release-resumable

Conversation

@sethherr

@sethherr sethherr commented Aug 5, 2026

Copy link
Copy Markdown
Member

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.

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
sethherr merged commit 50d88b9 into main Aug 5, 2026
4 checks passed
@sethherr
sethherr deleted the make-bin-release-resumable branch August 5, 2026 15:57
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
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