fix(build): migrate deprecated brews config to homebrew_casks#2
Conversation
goreleaser check now fails on the deprecated brews property; casks are the supported path for pre-built binaries. The cask strips the macOS quarantine attribute post-install since release binaries are unsigned. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request transitions the Homebrew distribution from a formula to a cask in .goreleaser.yaml, updates the target directory to Casks, and adds a post-install hook to strip the macOS quarantine attribute from the unsigned binary. The README is also updated to clarify that Homebrew is for macOS. The feedback suggests simplifying the post-install hook by using OS.mac? instead of checking for the existence of /usr/bin/xattr via system_command, which is unnecessary on macOS and could clutter logs or cause crashes.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| if system_command("/usr/bin/xattr", args: ["-h"]).exit_status == 0 | ||
| system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/dscrd"] | ||
| end |
There was a problem hiding this comment.
Using system_command to check for the existence of /usr/bin/xattr by running it with -h is unnecessary and can cause issues. On macOS, /usr/bin/xattr is a standard system utility that is guaranteed to exist. Furthermore, running /usr/bin/xattr -h prints help/usage text to the console, which clutters the Homebrew installation logs. If the command were somehow missing or failed to execute, system_command would raise an exception (such as Errno::ENOENT) rather than returning a non-zero exit status, causing the installation to crash.
Using the standard OS.mac? check is the idiomatic and recommended approach in Homebrew Casks (and GoReleaser's documentation) to guard macOS-specific commands.
if OS.mac?
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/dscrd"]
end
Follow-up to #1: goreleaser's
checknow fails on the deprecatedbrewsproperty (main CI is currently red because of it). This migrates the tap publishing tohomebrew_casks— the supported path for pre-built binaries:Casks/directory;skip_upload: autostill keeps prereleases outValidated locally:
goreleaser checkpasses with no deprecation warnings.🤖 Generated with Claude Code