Skip to content

build: publish a Homebrew formula instead of a cask - #36

Merged
blairham merged 1 commit into
mainfrom
build/homebrew-formula
Aug 13, 2026
Merged

build: publish a Homebrew formula instead of a cask#36
blairham merged 1 commit into
mainfrom
build/homebrew-formula

Conversation

@blairham

Copy link
Copy Markdown
Owner

Moves this repo from homebrew_casks: back to brews:.

Why

A CLI binary with no bundle, no installer and no service is formula territory, not cask territory. Two concrete consequences of the cask:

  • brew services is unavailable to casks entirely — casks have no service stanza.
  • Casks flag their downloads with com.apple.quarantine. That is the only reason the ad-hoc codesign postflight hook existed in this config. Formulae do not quarantine, so the workaround is deleted rather than carried forward.

On the deprecation

GoReleaser marks brews deprecated in favour of homebrew_casks. The stated reason:

Historically, GoReleaser would generate hackyish formulas that would install the pre-compiled binaries. This was the only way to do it for Linuxbrew at the time, but this is no longer true, and Casks should be used instead.

That is about Linuxbrew once being unable to handle casks — a constraint that was never our reason for using formulae. There is no announced removal date (soft since v2.10, formal since v2.16). Formulae work on Homebrew for Linux exactly as they always have, so nothing here regresses on Linux.

Verification

goreleaser check passes (with the expected brews deprecation notice), and a snapshot build emits dist/homebrew/Formula/*.rb instead of Casks/*.rb.

This is a CLI binary — no bundle, no installer, no service — which is
formula territory rather than cask territory. Casks also flag their
downloads with com.apple.quarantine, which is the only reason the ad-hoc
codesign postflight hook existed here; formulae do not, so it is gone.

GoReleaser deprecates `brews` on the grounds that binary-installing
formulae are "hackyish" and were only needed because Linuxbrew could not
handle casks. That constraint was never our reason for using them, and
there is no announced removal date. Formulae work on Homebrew for Linux
exactly as they do on macOS.
@blairham
blairham merged commit 34c98a9 into main Aug 13, 2026
5 checks passed
@blairham
blairham deleted the build/homebrew-formula branch August 13, 2026 18:44
blairham added a commit that referenced this pull request Aug 15, 2026
The README predated several shipped changes: the Homebrew formula (#36),
the action's install-only input (#31), and the bench script's move into
.github/. It also pointed users at go install without warning that the
binary lands as go-pre-commit while the installed hooks exec pre-commit
by name.

- README: add Homebrew install, document install-only, fix bench path,
  refresh version examples, note the go install binary-name gotcha, and
  document that make check does not lint
- AGENTS.md: add missing internal/fsutil/ to the structure; drop the
  hardcoded goreleaser version (drift bait — .tool-versions is the pin)
- action.yml: refresh the version input's example string
- bench.sh: cd to the repo root, not .github/ — the script was moved
  there without updating its paths, so it could never find the binary
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