Skip to content

build: generate fish completion at release instead of committing it - #999

Merged
u9g merged 1 commit into
mainfrom
jason/fish-completion-build
Sep 25, 2026
Merged

u9g merged 1 commit into
mainfrom
jason/fish-completion-build

Conversation

@u9g

@u9g u9g commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

autocomplete/fish_autocomplete was generated from the command tree and committed. Any PR that adds or changes a command then failed CI until someone regenerated the file by hand. For example, #997 failed only because of this.

This PR stops committing the file and generates it during the release instead:

  • The file is removed from the repo and added to .gitignore.
  • The release job in release.yaml pulls lk out of the linux/amd64 archive and runs lk generate-fish-completion. It then adds the output to every .tar.gz and .zip before checksums are computed. The archives keep the same layout, so install-cli.sh needs no change.
    • It runs in the release job because lk only builds with cgo, and most release jobs cross-compile binaries that can't run on their runner. The fish output is the same for every target.
  • The "Verify fish_autocomplete is up to date" step in test.yaml and the go:generate directive are removed.

Tested locally by running the new step on sample linux .tar.gz and windows .zip archives built with a real lk. Both came out with autocomplete/fish_autocomplete added, and it is identical to the committed file on main.

Follow-up needed: the homebrew-core livekit-cli formula installs autocomplete/fish_autocomplete from the source tarball. Before the first release without the file, the formula has to generate the completion instead:

generate_completions_from_executable(bin/"lk", "generate-fish-completion", shells: [:fish], shell_parameter_format: :none)

@u9g
u9g merged commit 7932187 into main Sep 25, 2026
25 checks passed
@u9g
u9g deleted the jason/fish-completion-build branch September 25, 2026 16:03
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