From e61392570178bffe9582c8c3eba126b172655dfb Mon Sep 17 00:00:00 2001 From: Joel Scheuner Date: Mon, 21 Sep 2026 18:40:42 +0200 Subject: [PATCH] Fix deprecated postflight stanza in the generated Homebrew cask Co-Authored-By: Claude --- .goreleaser.yaml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0cb76ae0..bcef1288 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -83,12 +83,17 @@ homebrew_casks: bash: completions/lstk.bash zsh: completions/lstk.zsh fish: completions/lstk.fish - hooks: - post: - install: | - if OS.mac? - # The whole staged dir, not only lstk: the bundled extensions binary - # sits next to it and would otherwise be blocked by Gatekeeper on its - # first run. - system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}"] - end + # hooks.post.install emits Homebrew's deprecated `postflight`; the + # replacement arrives as hooks.post.install_steps in GoReleaser v2.19 + # (goreleaser/goreleaser#6873). Until then custom_block writes the stanza, + # escaping `{{staged_path}}` past GoReleaser's template pass. It renders + # first in the cask, so `brew style` reports stanza-order offences. + custom_block: | + postflight_steps do + on_macos do + # The whole staged dir, not only lstk: the bundled extensions binary + # sits next to it and would otherwise be blocked by Gatekeeper on its + # first run. + run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{ "{{staged_path}}" }}"] + end + end