Skip to content

fix(release): use install_steps for the cask quarantine hook - #25

Merged
hlubek merged 1 commit into
networkteam:mainfrom
dr-format-d:fix/cask-postflight-steps
Oct 31, 2026
Merged

hlubek merged 1 commit into
networkteam:mainfrom
dr-format-d:fix/cask-postflight-steps

Conversation

@dr-format-d

@dr-format-d dr-format-d commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Homebrew deprecated the postflight block in casks. brew update prints this warning for the sdd cask:

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

GoReleaser writes the postflight block from the hooks.post.install field. GoReleaser marks this field as deprecated. This change replaces it with hooks.post.install_steps. GoReleaser then writes a postflight_steps block.

-        install: |
-          if OS.mac?
-            system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/sdd"]
+        install_steps: |
+          on_macos do
+            run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{ .StagedPath }}/sdd"]

The hook does the same work as before. It removes the quarantine flag from the sdd binary on macOS. {{ .StagedPath }} is a GoReleaser field. It renders as the Homebrew token {{staged_path}}.

Test

  • goreleaser check passes with the latest GoReleaser image.
  • A snapshot release renders postflight_steps in Casks/sdd.rb.
  • I installed the snapshot archive as two throwaway casks. One cask has no hook. The other cask has the new hook.
    • Without the hook, the binary keeps com.apple.quarantine.
    • With the hook, the binary has no com.apple.quarantine.
  • The install prints no deprecation warning.

I did not test the real release job. The snapshot skips the upload to the tap.

Notes

  • The release workflow uses version: "~> v2". It installs the newest GoReleaser v2 release. If an older release does not know install_steps, pin version to a newer v2 release.
  • The warning stays in the tap until the next release. The release job rewrites Casks/sdd.rb in networkteam/homebrew-tap.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no blocking issue was found.

Summary

Replaces the deprecated Homebrew cask hook in .goreleaser.yaml with install_steps.

  • The Homebrew cask uses the current install-step hook format.

Reviews (1) · Last reviewed commit: "fix(release): use install_steps for the ..." · Reviewed by Greptile

@hlubek

hlubek commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Thanks! Tracked in the SDD graph:

  • 20261031-124516-s-ops-8cz (gap)
  • 20261031-125110-s-ops-8vi (done)

@hlubek
hlubek merged commit d8c4002 into networkteam:main Oct 31, 2026
4 checks passed
@dr-format-d
dr-format-d deleted the fix/cask-postflight-steps branch November 2, 2026 08:58
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