feat(cli): add --version flag and Homebrew tap scaffolding (#46) - #58
Merged
Conversation
Adds a top-level `--version` flag (and `gander version` subcommand) that prints the version and exits 0. This lets the Homebrew formula's `test do` block assert the version string without triggering `fetchLatestRelease` (which would fail in Homebrew's network-isolated sandbox). Rewrites the README install section so Homebrew leads: brew tap gandermd/gander brew install gander The `curl | bash install.sh` one-liner is demoted to a 'fallback / non-Homebrew systems' subsection; the rest of the install flow is unchanged. Adds `scripts/bump-homebrew.sh <version>`, a thin wrapper around `brew bump-formula-pr` that opens a PR against gandermd/homebrew-gander after each release. Documented in the Releasing section.
This was referenced Aug 23, 2026
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
--versionflag (andgander versionsubcommand) that prints the version and exits 0brew tap gandermd/gander && brew install gander. Demoteinstall.shto a "fallback / non-Homebrew systems" subsection.scripts/bump-homebrew.sh <version>that wrapsbrew bump-formula-prso each release auto-opens a PR against thegandermd/homebrew-gandertap.Related Issue
Closes #46
Companion repo
gandermd/homebrew-ganderwill be created in a follow-up PR (separate repo, separate PR). It contains:Formula/gander.rbpinned atv0.11.0(multi-arch:on_macos/on_linux×arm64/amd64);manandcompletionstarballs attached to the v0.11.0 release are pulled in asresourceblocksLICENSE(MIT, copy of upstream)README.mdand.github/workflows/audit.ymlrunningbrew audit --strictTesting
go test ./...passes (including newTestPrintVersion)go vet ./...cleanCGO_ENABLED=0 go build -o gander .succeeds;./gander --versionprintsgander devand exits 0scripts/bump-homebrew.sh --helpprints usage and exits 0scripts/bump-homebrew.sh --dry-run 0.11.0validates the v0.11.0 release exists and prints thebrew bump-formula-prinvocation without executing itNotes
--versionwas needed for the Homebrew formula'stest doblock: running the binary with no args hitsrunNoArg, which callsfetchLatestRelease()— that touches the network and is blocked in Homebrew's sandbox. With--version, the test can assert the version string instead.gander-{goos}-{goarch}) is unchanged.assetNameForRuntimeinupgrade.gocontinues to match.gander --upgradecontinues to work for users installed via Homebrew: the GitHub release URL contract is unchanged.