fix(homebrew): rewrite bump-homebrew.sh to handle multi-arch formulas (#60) - #61
Merged
Conversation
brew bump-formula-pr cannot update URLs nested inside on_macos / on_linux blocks (Homebrew core's stance: not supported, see Homebrew/brew#8967). Since Formula/gander.rb ships 4 separate binaries (macOS+Linux x arm64/amd64), the original bump-homebrew.sh errored with 'Could not find url stanza!'. Replace the brew bump-formula-pr call with an inline Ruby rewrite: - read current version from the formula URL - fetch every release asset's SHA256 via gh release view --json assets - rewrite v<old> -> v<new> in every URL and update the matching sha256 - tighten the test do block from --help to --version (idempotent; gander gained --version in v0.12.0 — issue #59) - branch, commit, push, gh pr create against the tap End-to-end verified against v0.12.0: - PR gandermd/homebrew-gander#2 opened with correct diff - audit CI green - post-merge brew install + brew test pass
This was referenced Aug 23, 2026
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.
Summary
brew bump-formula-prcan't update URLs nested insideon_macos/on_linuxblocks (Homebrew core's stance is "not supported" — Homebrew/brew#8967). SinceFormula/gander.rbships 4 separate binaries (macOS+Linux × arm64/amd64), the originalscripts/bump-homebrew.sherrored withCould not find url stanza!.brew bump-formula-prcall with an inline Ruby rewrite that:gh release view --json assetsv<old> → v<new>in every URL and updates the matchingsha256test doblock from--helpto--version(idempotent; closes test(homebrew): tighten Formula/gander.rb test to --version once next release ships #59)gh pr creates against the tapEnd-to-end verification (closes #60)
brew install gandermd/gander/ganderinstalls v0.12.0;brew test gandermd/gander/ganderpasses the new--versionassertion.brew audit --strict --new --tap=gandermd/gander ganderexits 0.Closes
scripts/bump-homebrew.shvalidated end-to-end.gander --version(which gander gained in v0.12.0).Notes
brewpreflight check is gone — it's no longer required. The script now requiresgh(authenticated, repo scope) andruby(ships with macOS).git pushthen immediatelybrew installon the same checkout can leave the tap cache showing merge-conflict markers from the in-flight push.brew untap && brew tap(orrm -rf $(brew --repository)/Library/Taps/gandermd/homebrew-gander) clears it.