-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: homebrew casks #5780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: homebrew casks #5780
Conversation
- rename cask.rb to formula.rb - change type to BrewFormula instead of BrewTap
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Deploying goreleaser with
|
Latest commit: |
c2eb36d
|
Status: | ✅ Deploy successful! |
Preview URL: | https://a6a332ba.goreleaser.pages.dev |
Branch Preview URL: | https://newb.goreleaser.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Thanks so much for the work, just a few nits to make it official quality.
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5780 +/- ##
==========================================
- Coverage 82.93% 82.93% -0.01%
==========================================
Files 161 163 +2
Lines 15932 16292 +360
==========================================
+ Hits 13214 13511 +297
- Misses 2144 2190 +46
- Partials 574 591 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for generating Homebrew casks alongside deprecating the old brews
pipe. Key changes include:
- Introduces a new
homebrew_casks
configuration and corresponding template logic underinternal/pipe/cask
- Deprecates the old
brews
pipe and updates related constants and behavior - Provides golden test data for cask output and updates the main
.goreleaser.yaml
to use casks
Reviewed Changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
.goreleaser.yaml | Replaced brews section with homebrew_casks |
internal/pipe/cask/templates/linux_packages.rb | Added Linux package blocks for casks |
internal/pipe/cask/templates/macos_packages.rb | Added macOS package blocks for casks |
internal/pipe/cask/templates/cask.rb | Main cask template generating full Ruby casks |
internal/pipe/cask/template.go | Data struct and embedding for cask templates |
internal/pipe/brew/brew.go & brew_test.go | Deprecation notices and updated constants |
internal/artifact/artifact.go | Introduced BrewCask type alongside BrewFormula |
internal/pipe/cask/testdata/TestFullPipe/*.golden | Golden files for cask pipeline tests |
Comments suppressed due to low confidence (3)
.goreleaser.yaml:221
- The YAML key
homebrew_casks
may not align with the Go struct fieldHomebrewCask
(singular). Verify the mapping or rename the key to match the struct name.
homebrew_casks:
internal/pipe/cask/template.go:1
- [nitpick] There are no unit tests for the new cask pipe implementation. Consider adding tests under
internal/pipe/cask
to validate template rendering and publishing workflows.
package cask
internal/pipe/cask/templates/linux_packages.rb:7
- [nitpick] The ARM block nesting is misaligned: the
if
inside this branch doesn't match a correspondingdo
/end
for anon_arm
block. Consider usingon_arm do ... end
consistently and ensure each conditional block is properly closed.
{{- else if eq $element.Arch "arm" }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, couple more notes.
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
and some other small, unrelated changes
Gonna merge this so it gets in the next nightly builds! Thanks so much for all the help and support here @SMillerDev! Really appreciate it <3 |
Thanks for the work here! Very happy to see the situation improved for both Homebrew and Goreleaser. |
homebrew_casks
root configurationbrews
/Formula
folder, new default should beCask
closes #5607
closes #5594
refs https://github.com/Homebrew/brew/blob/master/docs/Cask-Cookbook.md