goreleaser: emit non-deprecated depends_on macos: form#171
Open
tariqwest wants to merge 1 commit into
Open
Conversation
The current Homebrew formula generated for cirruslabs/homebrew-cli emits a deprecation warning on every brew run: 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. This is caused by the `custom_block` injecting the legacy hash-rocket form `depends_on :macos => :sequoia` into the generated formula. Replacing it with the equivalent `on_macos do ... end` block makes the generated softnet.rb conform to current Homebrew syntax and silences the warning.
|
Duplicate of #169. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Homebrew formula generated by this project's GoReleaser config (
.goreleaser.yml→brews→custom_block) emits a deprecation warning on everybrewinvocation againstcirruslabs/homebrew-cli:The cause is the legacy hash-rocket form
depends_on :macos => :sequoiathat this config injects into the generatedsoftnet.rb. The brew formula header notes# This file was generated by GoReleaser. DO NOT EDIT., so the only correct fix lives here, not in the tap.Change
Replaces the legacy form with the modern
on_macos do ... endblock, which is what Homebrew's deprecation message suggests:This is semantically equivalent (softnet is already a macOS-only project per its build targets) and produces a generated formula that no longer warns.
Notes
brews.repositoryfield still points tocirruslabs/homebrew-clifrom the pre-transfer days. That's left untouched by this PR \u2014 separate concern from the deprecation.