ci: migrate the Homebrew tap from a formula to a cask - #116
Merged
Conversation
10 tasks
goreleaser reports 'brews should not be used anymore'. Homebrew's own policy draws the line by artifact type: casks distribute pre-built files published by the developer, while formulae are built from source. The brews block only ever emitted a formula that downloads our prebuilt tarball and copies the binary out, which is cask territory. homebrew_casks also replaces the hand-written extra_install Ruby with declarative completions/manpages fields, and the man/*.1 glob expands to all 53 generated pages on its own. Ship tap_migrations.json alongside it. Homebrew's update reporter has a dedicated same-tap formula-to-cask branch (new_tap == tap in migrate_tap_migration), so existing installs migrate automatically on brew update rather than silently going stale. The darwin binaries are not notarized and Homebrew quarantines cask downloads, so a postflight hook clears com.apple.quarantine.
sergiught
force-pushed
the
ci/migrate-homebrew-casks
branch
from
August 3, 2026 09:47
e445eb9 to
4cfc456
Compare
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
goreleaser checkfails on our config withDEPRECATED: brews should not be used anymore— note the stronger wording than thedockersnotice in #115: this one is "should not be used", not "being phased out".The reason is Homebrew's own taxonomy, not a goreleaser preference. From
Acceptable-Casks.md:Our
brewsblock only ever emitted a formula that downloads the prebuilt release tarball and copies the binary out — a cask wearing a formula's clothes.homebrew_casksputs it on the right side of that line.Secondary win: the hand-written
extra_installRuby is replaced by declarativecompletions:/manpages:fields, and theman/*.1glob expands to all 53 generated pages by itself.🔄 Existing users migrate automatically
This PR also ships
packaging/homebrew-tap/tap_migrations.json. Homebrew's update reporter has a dedicated same-tap formula→cask path —Library/Homebrew/cmd/update_report/reporter.rb, inmigrate_tap_migration:When it fires,
brew updaterunsbrew unlink ofga,brew cleanup, thenbrew install --cask sergiught/tap/ofga, and tells the user tobrew uninstall --formula --force ofgaat their convenience.{"ofga": "ofga"}is the mapping that resolves to the fully-qualified cask token (tracing the name-resolution branches in that same method).Without this file, existing installs would keep a formula that stops receiving updates, silently. With it, no user action is required and no reinstall instructions are needed.
🚚 Merge steps in the tap repo
This PR cannot complete the migration on its own —
sergiught/homebrew-tapneeds two manual changes, ideally in the same commit, timed with the first release on this config:tap_migrations.json(copy frompackaging/homebrew-tap/tap_migrations.json).Formula/ofga.rb. goreleaser writesCasks/ofga.rbbut will not remove the old formula. If it stays, the tap carries a stale formula pinned at 0.267.0 alongside the cask.📥 How users install
Unchanged —
brew installacceptsformula|cask, so the documented command still resolves:brew upgrade ofgaandbrew uninstall ofgaalso work on casks (brew upgradeis documented overinstalled_formula | installed_cask). No docs changes needed toREADME.md:100ordocs/site/src/content/docs/guide/installation.mdx.Casks support Linux — Homebrew's Cask Cookbook documents
on_linuxanddepends_on :linux— so no platform coverage is lost. The generated cask carries all four macOS/Linux × intel/arm combinations.🏷 Type of change
✅ How to verify
goreleaser check # brews deprecation gone goreleaser release --snapshot --clean --skip=sbom,nfpm,aur,sign,docker cat dist/homebrew/Casks/ofga.rbGenerated locally with goreleaser v2.17.0 — abridged:
The
postflighthook is required because our darwin binaries aren't notarized and Homebrew quarantines cask downloads — without it macOS Gatekeeper blocks the binary on first run.Not verified on a Mac. The cask generation, config validation and Homebrew behaviour above are all read from generated output and Homebrew's source; I have no macOS/brew available. Worth one
brew install sergiught/tap/ofgaon a Mac after the first release on this config, and confirming an existing formula install migrates onbrew update.📋 Checklist
packaging/README.mdnow points atCasks/ofga.rband the new migrations file; user-facing install docs need no changemake checkpasses locally — n/a, no Go code touched