Context
Homebrew 7.0 deprecated the raw-Ruby postflight cask stanza in favour of a declarative postflight_steps DSL. Our generated cask still emits postflight, so brew prints a deprecation warning on every command that touches the tap. Deprecations become errors in a later Homebrew release.
This could not be fixed alongside the verified: removal because the GoReleaser side does not exist in any stable release yet: hooks.post.install_steps is milestoned for v2.19.0, which is currently unreleased (nightlies only).
What to do when v2.19.0 ships
Bump the pinned GoReleaser in the release workflow, then change each homebrew_casks entry from:
hooks:
post:
install: |
if OS.mac?
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/bab"]
end
to:
hooks:
post:
install_steps: |
on_macos do
run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{ .StagedPath }}/bab"]
end
{{ .StagedPath }} is a new GoReleaser template field shipped alongside install_steps, needed because Homebrew's own {{staged_path}} token uses the same delimiters as GoReleaser templates.
Note install_steps is a fixed step vocabulary (run, mkdir_p, move, symlink, terminate_process, …), not arbitrary Ruby — it cannot be a mechanical translation of any more complex hook.
Verification
goreleaser check, then a snapshot build, and confirm the generated cask contains postflight_steps and no postflight. After a release lands, brew update && brew upgrade should print no warning for this tap.
🤖 Generated with Claude Code
Context
Homebrew 7.0 deprecated the raw-Ruby
postflightcask stanza in favour of a declarativepostflight_stepsDSL. Our generated cask still emitspostflight, sobrewprints a deprecation warning on every command that touches the tap. Deprecations become errors in a later Homebrew release.This could not be fixed alongside the
verified:removal because the GoReleaser side does not exist in any stable release yet:hooks.post.install_stepsis milestoned for v2.19.0, which is currently unreleased (nightlies only).postflightstanza goreleaser/goreleaser#6870 — the tracking issueWhat to do when v2.19.0 ships
Bump the pinned GoReleaser in the release workflow, then change each
homebrew_casksentry from:to:
{{ .StagedPath }}is a new GoReleaser template field shipped alongsideinstall_steps, needed because Homebrew's own{{staged_path}}token uses the same delimiters as GoReleaser templates.Note
install_stepsis a fixed step vocabulary (run,mkdir_p,move,symlink,terminate_process, …), not arbitrary Ruby — it cannot be a mechanical translation of any more complex hook.Verification
goreleaser check, then a snapshot build, and confirm the generated cask containspostflight_stepsand nopostflight. After a release lands,brew update && brew upgradeshould print no warning for this tap.🤖 Generated with Claude Code