Generate Homebrew cask completions at install time#1085
Merged
gtrrz-victor merged 1 commit intomainfrom Apr 30, 2026
Merged
Conversation
Use goreleaser v2.15+ generate_completions_from_executable so brew runs the installed binary to emit shell completions, eliminating drift between cask and binary. Archive-bundled completions kept for tarball/Scoop users. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 9118215b7597
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the GoReleaser configuration so Homebrew casks generate shell completions from the installed entire executable at install time, preventing shipped cask completions from drifting from the binary.
Changes:
- Replaces the static
completions:mapping for bothentireandentire@nightlycasks withgenerate_completions_from_executable. - Configures Homebrew completion generation to use Cobra’s completion argument format and emit
bash,zsh, andfishcompletions.
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.
https://entire.io/gh/entireio/cli/trails/271
Summary
homebrew_casks(entire,entire@nightly) from a staticcompletions:block to goreleaser v2.15+generate_completions_from_executable. Brew now runs the installed binary at cask install time to emitbash/zsh/fishcompletions, so completions can never drift from the binary they ship next to.shell_parameter_format: cobrais sufficient — Homebrew's cask DSL already appendscompletion <shell>. (Initial draft also passedargs: [completion]which produced doubledentire completion completion bashand was killed by Gatekeeper before the cask install error surfaced.)before:hook still runsmise run completions, andarchives.files: completions/*still bundles the files for tarball and Scoop users (the new field is homebrew-cask-only).Test plan
goreleaser checkpasses against the new config.goreleaser release --snapshot --clean --skip=publish,announce,sign,notarizeproduces a cask containinggenerate_completions_from_executable "entire", shell_parameter_format: :cobra, shells: [:bash, :zsh, :fish].brew tap-new local/entire-test→ copy snapshot cask →HOMEBREW_CASK_OPTS=--no-quarantine brew install --cask local/entire-test/entire) installs cleanly with no completion-generation warnings./opt/homebrew/etc/bash_completion.d/entire(16 KB),/opt/homebrew/share/zsh/site-functions/_entire(7.7 KB),/opt/homebrew/share/fish/vendor_completions.d/entire.fish(9.6 KB); zsh file starts with#compdef entire/compdef _entire entire(real cobra output).goreleaser-proaction withversion: latest— already ≥ v2.15, no version pin bump needed.Notes
--no-quarantinewas only needed to bypass Gatekeeper on the unsigned snapshot binary during local validation. Production releases go through the existingnotarize:block, so end users will not need any flag.🤖 Generated with Claude Code
Note
Medium Risk
Medium risk because it changes Homebrew cask packaging behavior by generating shell completions at install time, which could break installs if the CLI’s completion command or Cobra parameters change.
Overview
Switches both Homebrew casks (
entireandentire@nightly) from shipping static completion files to using GoReleaser’sgenerate_completions_from_executableso Homebrew generatesbash/zsh/fishcompletions from the installedentirebinary at install time.This aligns completions with the exact binary being installed and removes the per-shell
completions:file references from the cask config.Reviewed by Cursor Bugbot for commit b11faa5. Configure here.