From 32d084e9edff989a114a971ab59f820b5e459e0f Mon Sep 17 00:00:00 2001 From: Greg Hurrell Date: Tue, 16 Jun 2026 00:25:38 +0200 Subject: [PATCH] fix(homebrew): wrap macOS version dependency in on_macos block (#1264) GoReleaser's Homebrew template always emits a bare `depends_on :macos` for macOS-only formulae. Combining that with the `depends_on :macos => :ventura` 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/tart.rb:22 Declaring the version constraint inside an `on_macos` block is the form Homebrew recommends and silences the warning without changing behavior (still macOS-only, Ventura or newer). --- .goreleaser.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 18f4232..43b9044 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -72,7 +72,9 @@ brews: libexec.install Dir["*"] bin.write_exec_script "#{libexec}/tart.app/Contents/MacOS/tart" custom_block: | - depends_on :macos => :ventura + on_macos do + depends_on :macos => :ventura + end def post_install generate_completions_from_executable(libexec/"tart.app/Contents/MacOS/tart", "--generate-completion-script") end