chore: prep for homebrew-core submission#296
Conversation
The codebase has no CGO usage (no `import "C"`, no `//#cgo` directives), so the CGO_ENABLED=1 flag on the darwin amd64 build produced a libc-linked binary for no benefit. The arm64 darwin build, all linux builds, and the npm package builds (since commit fd2338b) already use CGO_ENABLED=0. This change makes the GoReleaser-built tap binaries statically linked and consistent with every other build path. Refs #295 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The `gateway connection pause` and `gateway connection unpause` commands accept an ID or name (added in #276), but REFERENCE.md still documented the older ID-only argument. Regenerated from cobra command metadata to sync. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previously, `hookdeck completion --shell bash` wrote the completion script to a file in the current working directory and printed multi-step shell setup instructions. This was non-standard — every other major Cobra-based CLI (gh, goreleaser, kubectl, helm, terraform) outputs the script to stdout so it can be piped, redirected, or sourced directly. Outputting to stdout enables the canonical pattern: source <(hookdeck completion --shell bash) The Long help text now documents the redirection patterns; OS-specific instruction blobs have been removed from the command output. Also unblocks the idiomatic `generate_completions_from_executable` helper in Homebrew formulae, which assumes stdout output. BREAKING CHANGE: `hookdeck completion --shell <shell>` no longer creates a file in the current directory or prints setup instructions. Use shell redirection to write to a file. Release notes will call this out. scripts/completions.sh updated to use redirection. README.md "Completion" section rewritten to show the new pattern. REFERENCE.md regenerated. Refs #295 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Manual test results — all passRan against fresh build of HEAD ( Test 1: bash completion to stdout
Test 2: bash sourcing
Test 3: zsh sourcing
Note: bare Test 4: scripts/completions.sh
CI statusAll 12 jobs pass, including the critical OutstandingThe |
|
Addressed review feedback. New commit(s) pushed; verification passed. |
Summary
Preparation work to enable submitting
hookdeckto homebrew-core, which lets usersbrew install hookdeckwithout thebrew truststep that becomes mandatory when Homebrew 5.2.0 ships (~4–8 weeks). Tracked in #295; parent context in #294.Three logical commits:
chore(release): disable CGO for darwin builds in mac.yml— Removes the vestigialCGO_ENABLED=1flag from the darwin amd64 GoReleaser build. The codebase has no actual CGO usage (noimport "C", no#cgodirectives); the flag was cargo-culted from the very first release config in 2021 (4d423da) and never revisited. All other builds (darwin arm64, all linux, all windows, all npm builds since commitfd2338bin Feb 2026) already useCGO_ENABLED=0. Resulting binary is statically linked and consistent across the build matrix. Locally smoke-tested: build succeeds, version-string injection intact.docs: regenerate REFERENCE.md for connection pause/unpause command— Drive-by fix for stale auto-generated docs. Thegateway connection pause/unpausecommands accept an ID or name (added in CLI: connection pause/unpause should accept connection name or ID #276), butREFERENCE.mdstill documented the older ID-only argument. Regenerated from cobra metadata viago run ./tools/generate-reference.feat(completion): output completion script to stdout— Changeshookdeck completion --shell <shell>to write the completion script to stdout instead of writing a file to the current directory and printing multi-step setup instructions. This brings the command in line with every other major Cobra-based CLI (gh,goreleaser,kubectl,helm,terraform) and unblocks the idiomaticgenerate_completions_from_executablehelper in the homebrew-core formula. Also simplifiesscripts/completions.shsignificantly.hookdeck completionhookdeck-completion.bash/.zshto cwd--help) documents the redirection patternAnyone scripting against the old file-writing behavior is affected. The next release notes (drafted by the
hookdeck-cli-releaseskill) should call this out — it should pick up automatically from the conventional commit but worth verifying when cutting.Canonical new usage:
Sequencing — what happens after this merges
vX.Y.Z). Automatically rolls in v2.1.2-beta.1's auth-recovery work (already inmainvia squash-mergebc3e7cbof fix(cli): auth recovery for stale keys and clearer 401 UX #286) plus this branch's changes./opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/h/hookdeck.rblocally) with the new release'surl+sha256+ version.Homebrew/homebrew-core, push the formula branch, open PR titledhookdeck X.Y.Z (new formula).The formula already passes
brew audit --strict --new --online hookdeckclean.Test plan
Homebrew Build and Installation Testsworkflow passes (validates GoReleaser config still produces a valid Homebrew formula end-to-end)go build && ./hookdeck completion --shell bash | headshows the bash completion script on stdout (no file written, no instructions printed)source <(./hookdeck completion --shell bash)enables completions in the current bash sessionsource <(./hookdeck completion --shell zsh)enables completions in the current zsh sessionbash ./scripts/completions.shproducescompletions/hookdeck.bashandcompletions/_hookdeckcorrectlybrew install --build-from-source ./Formula/h/hookdeck.rbin the local homebrew-core checkout succeeds🤖 Generated with Claude Code