Skip to content

build(release): publish mecatl to Homebrew as a cask - #2428

Merged
rdimitrov merged 1 commit into
mainfrom
migrate-homebrew-cask
Oct 20, 2026
Merged

rdimitrov merged 1 commit into
mainfrom
migrate-homebrew-cask

Conversation

@rdimitrov

Copy link
Copy Markdown
Member

Summary

GoReleaser deprecated brews (formulae) in favour of homebrew_casks. .goreleaser.yaml kept brews until the three repos publishing to stacklok/homebrew-tap could move together. toolhive has since moved (stacklok/toolhive#6859, stacklok/toolhive#6870), and modelith is moving alongside this PR. mecatl ships prebuilt binaries, which is what casks are for.

  • .goreleaser.yaml: brews becomes homebrew_casks, with binaries: [mecated, mecatui]. skip_upload: auto is kept, so prereleases still don't bump the tap. The cask goes in the tap's Casks/ directory.
  • macOS quarantine: Homebrew quarantines cask downloads, and the darwin binaries aren't notarized. A postflight_steps stanza strips the attribute from both binaries after install. It's written via custom_block because hooks.post.install generates Homebrew's deprecated Ruby postflight block. Its body is exactly what GoReleaser's upcoming install_steps option generates (goreleaser/goreleaser@4ebadf5).
  • task release:verify: now style-checks dist/homebrew/Casks/mecatl.rb, skipping Cask/StanzaOrder because custom_block puts the stanza at the top of the cask.
  • goreleaser check gates (release:check, ci.yml): still accept exit 2. The comment no longer cites brews, since nothing in the config is deprecated now.
  • Wording: "formula" becomes "cask" in release.yml, ci.yml, the cut-release skill (including the tap path it checks) and the README.
  • Version tripwire: the formula's test block, which asserted the linker stamp, goes away because casks have no test block. The smoke-darwin-arm64 CI job and release:verify already assert the same stamp before publication.

Relates to stacklok/toolhive#6859

Type of change

  • Other (describe): release packaging change

Test plan

Baseline checks

  • Markdown changed: docs generation/link checks (task docs)

Release checks

  • goreleaser check exits 0 on v2.16.0 (Taskfile pin) and v2.18.2 (CI pin).
  • task release:check, task release:snapshot and task release:verify all pass with v2.18.2: both binaries are at the archive root, both report the stamped version, and brew style reports no offenses. The generated cask covers darwin/linux × amd64/arm64.
  • On macOS arm64 with Homebrew 7.0.10, I installed a throwaway cask with this stanza and the v0.0.48 release tarball. There was no deprecation warning, the quarantine flag was removed from both mecated and mecatui, and both ran (--version reports v0.0.48).

User-facing change

  • Before: brew install stacklok/tap/mecatl installs a formula.
  • After: from the next release, the same command installs a cask with the same two binaries.

Existing formula installs move over automatically on brew update, once the tap retires Formula/mecatl.rb (see notes).

Special notes for reviewers

  • Tap follow-up, after the first release with this change: delete Formula/mecatl.rb from stacklok/homebrew-tap and add "mecatl": "stacklok/tap" to its tap_migrations.json (toolhive's thv entry is already there). Until then the tap has both a stale formula and the new cask, and Homebrew keeps resolving stacklok/tap/mecatl to the formula. toolhive went through this same sequence, verified end to end (brew update printed "migrated from a formula to a cask" and installed the cask).
  • Old Homebrew: postflight_steps needs Homebrew 5.1.14 or newer (May 2026). Older Homebrew prints Unexpected method 'postflight_steps' but still installs; that was tested with 4.6.20.
  • Later cleanup: once GoReleaser v2.19 is stable, custom_block can become hooks.post.install_steps, and release:verify can drop --except-cops Cask/StanzaOrder.
  • Out of scope: the cut-release skill's note that brew install fails while the repo is private is stale, because the repo is public now.

🤖 Generated with Claude Code

GoReleaser deprecated the brews pipe in favour of homebrew_casks, and
toolhive and modelith now publish casks to stacklok/homebrew-tap too.
mecatl ships prebuilt binaries, which is what casks are for.

The cask links both mecated and mecatui. Homebrew quarantines cask
downloads and the darwin binaries are not notarized, so a
postflight_steps stanza (via custom_block, matching what GoReleaser's
upcoming install_steps generates) strips the attribute after install.

release:verify now style-checks the cask, skipping Cask/StanzaOrder
because custom_block places the stanza at the top.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rdimitrov
rdimitrov merged commit 6236781 into main Oct 20, 2026
40 checks passed
@rdimitrov
rdimitrov deleted the migrate-homebrew-cask branch October 20, 2026 06:30
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 20, 2026
2 tasks
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