Skip to content

fix(release): use postflight_steps for Homebrew cask hook - #207

Merged
yimsk merged 1 commit into
mainfrom
fix/cask-postflight-steps
Oct 31, 2026
Merged

yimsk merged 1 commit into
mainfrom
fix/cask-postflight-steps

Conversation

@yimsk

@yimsk yimsk commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Installing the cask (brew install --cask clawscli/tap/claws) prints:

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

Reported in clawscli/homebrew-tap#1. The cask is generated by GoReleaser, so the fix belongs here.

  • .goreleaser.yaml: switch hooks.post.install (deprecated in GoReleaser v2.19) to hooks.post.install_steps, using the step DSL (on_macos / run / {{ .StagedPath }}).
  • release.yml: require GoReleaser ^v2.19 (>=2.19.0 <3.0.0) so install_steps is always supported.

Generated cask:

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

Verification

  • goreleaser check and goreleaser release --snapshot with v2.19.0: cask generated as above.
  • Reviewed Homebrew 7.0.11 install_steps: on_macos, run, and {{staged_path}} are supported, and the steps sandbox allows writes under the Caskroom (which includes staged_path).
  • Not verified: an end-to-end brew install of the generated cask. This will take effect on the next release.

🤖 Generated with Claude Code

Homebrew deprecated the `postflight` block in casks, so installing
claws prints a deprecation warning. Switch the GoReleaser cask hook to
`install_steps` (GoReleaser v2.19+), which generates `postflight_steps`
with the `run` step DSL, and require GoReleaser ^v2.19 in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yimsk
yimsk merged commit 4b86431 into main Oct 31, 2026
8 checks passed
@yimsk
yimsk deleted the fix/cask-postflight-steps branch October 31, 2026 01:27
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