Skip to content

fix(release): generate the cask with postflight_steps instead of the deprecated postflight hook - #75

Merged
djalmaaraujo merged 1 commit into
mainfrom
da-postflight-steps
Oct 6, 2026
Merged

djalmaaraujo merged 1 commit into
mainfrom
da-postflight-steps

Conversation

@djalmaaraujo

Copy link
Copy Markdown
Collaborator

Homebrew deprecated postflight, and hooks.post.install still writes it, so every brew upgrade lk prints a warning. GoReleaser only adds install_steps hooks in v2.19 (goreleaser/goreleaser#6873, not released yet). Until then I moved the xattr step into custom_block as a postflight_steps stanza. Same behavior: strip quarantine on macOS, never fail the install.

GoReleaser runs the whole cask through its template engine, so Homebrew's {{staged_path}} needs the {{ "{{staged_path}}" }} escape.

custom_block lands at the top of the cask, so brew style complains about stanza order. That's cosmetic, the tap has no CI and audit passes. Once v2.19 ships we can move to hooks.post.install_steps.

The tap fix for the current release: linkanalabs/homebrew-tap#1

Verification
goreleaser check -> 1 configuration file(s) validated
goreleaser release --snapshot --clean --skip=publish,before -> dist/homebrew/Casks/lk.rb:
  postflight_steps do
    on_macos do
      run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{staged_path}}/lk"], must_succeed: false
    end
  end
# rendered cask loaded from a temporary local tap, nothing installed
brew info --cask lk -> no deprecation warning
brew audit --cask lk -> exit 0

@cirdes cirdes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Auto-approved: Bounded release-config fix: replaces the deprecated postflight hook with a postflight_steps custom_block, preserving the macOS quarantine-removal behavior and eliminating the Homebrew deprecation warning.

Re-trigger cubic

@djalmaaraujo
djalmaaraujo merged commit 4c9fcef into main Oct 6, 2026
5 checks passed
@djalmaaraujo
djalmaaraujo deleted the da-postflight-steps branch October 6, 2026 13:00
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.

2 participants