Skip to content

Switch band to a source-build formula#9

Open
kshahbw wants to merge 1 commit intomainfrom
feat/source-build-formula
Open

Switch band to a source-build formula#9
kshahbw wants to merge 1 commit intomainfrom
feat/source-build-formula

Conversation

@kshahbw
Copy link
Copy Markdown
Contributor

@kshahbw kshahbw commented May 4, 2026

Summary

Replaces the goreleaser-generated formula that downloaded a pre-built binary tarball with a source-build formula that downloads the GitHub-generated tag source archive and runs go build. Matches what gh, glab, fly, and the rest of the Go CLI ecosystem do.

Validated locally: brew audit --strict band passes clean against this formula. Install completes in ~22s on a stock machine (6s of which is the actual compile). No quarantine xattr is set on the installed binary, so Gatekeeper never gets involved on any user's machine.

Changes

  • Formula/band.rb — full rewrite to source-build form. Drops the explicit version field (extracted from URL automatically), the per-arch URL splits, and the separate Linux blocks. Same formula installs cleanly on macOS arm64, macOS Intel, and Linux brew.
  • .github/workflows/ci.yml — restore brew audit --strict (was relaxed in Skip redundant-version check in brew audit #7/Drop --strict from brew audit #8 to work around the goreleaser-generated formula's redundant version field; the source-build formula passes strict cleanly so we want full audit signal back).

Companion change on Bandwidth/cli (PR open) drops the brews: block from goreleaser and adds a follow-up workflow using mislav/bump-homebrew-formula-action to keep this formula in sync on each release.

Test plan

  • CI audit passes on this PR
  • Merge this PR (publishes the new formula)
  • Verify brew install bandwidth/tap/band still works for fresh installs
  • Verify brew upgrade band works for users coming from the prior pre-built formula
  • After cli PR merges and a new tag is cut, verify the auto-bump PR opens cleanly here

Replace the goreleaser-generated formula that downloaded a pre-built
binary tarball and bin.installed it. The new formula downloads the
GitHub-generated source archive for the tag and runs go build,
matching what gh, glab, fly, and the rest of the Go CLI ecosystem do.

Why this is the right shape:

- brew audit --strict passes clean. The version-redundancy nag we
  hand-edited around twice is gone for good — there's no explicit
  version field to clash with the URL.
- No quarantine xattr on the installed binary, so Gatekeeper never
  gets involved on any user's machine. No signing or notarization
  needed to give users a clean experience.
- Same install command users already know: brew install
  bandwidth/tap/band. Install time goes from ~5s to ~22s, but the
  bulk of that is brew installing go as a build dep on machines
  that don't have it.
- Future-proof against goreleaser's brews block being phased out -
  we're not using that codepath anymore.

Restore --strict on the audit step now that the formula is clean.
The cli repo's release workflow uses mislav/bump-homebrew-formula-
action to open a PR here on each tag push, automatically updating
url and sha256 to the new release's source archive. Companion
change is on cli's feat/source-build-formula branch.
@kshahbw kshahbw requested review from a team as code owners May 4, 2026 19:05
@bwappsec
Copy link
Copy Markdown

bwappsec commented May 4, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants