Skip to content

fix: use postflight_steps in Homebrew cask - #93

Open
displague wants to merge 1 commit into
mainfrom
fix/cask-postflight-steps
Open

displague wants to merge 1 commit into
mainfrom
fix/cask-postflight-steps

Conversation

@displague

Copy link
Copy Markdown
Member

Summary

Homebrew 7 deprecates the imperative postflight cask stanza in favor of the declarative postflight_steps DSL. The cask generated for equinix/homebrew-tap currently triggers this on brew upgrade:

Warning: Calling `postflight` is deprecated! Use `postflight_steps` instead.
Report this issue to the equinix/homebrew-tap tap:
  https://github.com/equinix/homebrew-tap/issues
  .../Casks/equinix.rb:36

This switches the GoReleaser cask hook from hooks.post.install to hooks.post.install_steps (GoReleaser v2.19+; the release workflow uses latest), per the GoReleaser deprecation notes:

  • if OS.mac? → on_macos do
  • system_command → run
  • #{staged_path} → {{ .StagedPath }}

Expected generated stanza (matches GoReleaser's hooks_steps golden test output):

postflight_steps do
  on_macos do
    run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{staged_path}}/equinix"]
  end
end

Testing

Not yet verified with a GoReleaser snapshot build. The generated cask in the tap should be checked after the next release.

🤖 Generated with Claude Code

Homebrew 7 deprecates the imperative `postflight` cask stanza in favor of
the declarative `postflight_steps` DSL, so `brew upgrade` warns:

  Warning: Calling `postflight` is deprecated! Use `postflight_steps` instead.

Switch the cask hook from `hooks.post.install` to GoReleaser's
`hooks.post.install_steps` (GoReleaser v2.19+), rewriting the quarantine
removal with `on_macos` / `run` and `{{ .StagedPath }}`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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