fix(homebrew): wrap macOS version dependency in on_macos block (#169)

GoReleaser's Homebrew template always emits a bare `depends_on :macos`
for macOS-only formulae. Combining that with the `depends_on :macos =>
:sequoia` line injected via custom_block triggers a Homebrew deprecation
warning on `brew upgrade`:

  Warning: Calling `depends_on :macos` with `depends_on macos:` is deprecated! Use `depends_on :macos` with `depends_on macos:` inside an `on_macos` block instead.
  Please report this issue to the cirruslabs/homebrew-cli tap (not Homebrew/* repositories), or even better, submit a PR to fix it:
    /opt/homebrew/Library/Taps/cirruslabs/homebrew-cli/softnet.rb:18

Declaring the version constraint inside an `on_macos` block is the form
Homebrew recommends and silences the warning without changing behavior
(still macOS-only, Sequoia or newer).
This commit is contained in:
Greg Hurrell 2026-07-07 18:40:37 +02:00 committed by GitHub
parent 14a3ee2ebc
commit 80f6813049
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -35,4 +35,6 @@ brews:
description: Software networking with isolation for Tart
skip_upload: auto
custom_block: |
depends_on :macos => :sequoia
on_macos do
depends_on :macos => :sequoia
end