Open
Conversation
The current goreleaser brews block emits a formula that downloads the pre-built binary tarball and bin.installs it. Three things wrong with that long-term: brew audit --strict trips on the redundant version field goreleaser hardcodes, brews itself is being phased out in goreleaser v3, and the next obvious move (Cask) introduces Gatekeeper concerns that need signing+notarization to fully solve. Source-build matches what gh, glab, fly, and the rest of the Go CLI ecosystem actually do. Validated locally: brew audit --strict passes clean, install completes in ~22s on a stock machine (6s of which is the actual go build), no quarantine xattr is set so Gatekeeper never gets involved, and the version is still injected via the same -X ldflag we use today. Drop the brews block from goreleaser (still produces tarballs for direct downloads). Replace it with a follow-up bump-formula job that runs after release and uses mislav/bump-homebrew-formula-action to open a PR on the tap updating url + sha256 to the new tag's GitHub- generated source archive. Tap-side companion change replaces Formula/band.rb with the source- build formula and is on a separate branch in Bandwidth/homebrew-tap.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
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 current
brews:block in goreleaser emits a Homebrew formula that downloads the pre-built binary tarball andbin.installsit. Three things wrong with that long-term:brew audit --strictkeeps tripping on the redundantversionfield goreleaser hardcodes. Hand-edited around it twice on past releases (266a39f8,032387d2in the tap), neither survived the next goreleaser run.brews:is being phased out in goreleaser (target removal: v3, no announced date) — eventually we'd have to migrate anyway.Source-build matches what
gh,glab,fly, and the rest of the Go CLI ecosystem actually do.Validated locally with the formula against
v0.1.0-beta's GitHub source archive:brew audit --strictbrew installtimego build)band version0.1.0-beta(ldflag injection works)Changes
brews:block from.goreleaser.yml. Goreleaser still produces tarballs for direct GitHub downloads — that part stays.bump-formulajob to the release workflow that runs afterreleaseand usesmislav/bump-homebrew-formula-actionto open a PR onBandwidth/homebrew-tapupdatingurlandsha256to the new tag's source archive.feat/source-build-formulabranch — replacesFormula/band.rbwith the source-build version.User-facing impact
Same install command (
brew install bandwidth/tap/band), samebrew upgrade bandflow. First-install time goes from ~5s to ~22s if the user doesn't already have Go (brew auto-installs it as a build dep). For an engineer audience this is a non-event.No more Gatekeeper concerns on any user's machine, no signing infrastructure needed.
Test plan
v0.1.1-beta) — release workflow runs, opens an auto-PR on the tap with bumpedurl+sha256brew upgrade bandworks on a clean machine