Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,29 @@ jobs:
merge-multiple: true
path: archives

# Generating the completion means running lk, and only the linux/amd64
# binary runs on this runner; the output is the same for every target.
- name: Add fish completion to archives
run: |
bin=$(mktemp -d)
tar -xzf archives/lk_*_linux_amd64.tar.gz -C "$bin" lk
"$bin/lk" generate-fish-completion -o "$bin/fish_autocomplete"
for archive in "$PWD"/archives/*; do
stage=$(mktemp -d)
case "$archive" in
*.zip)
mkdir "$stage/autocomplete"
cp "$bin/fish_autocomplete" "$stage/autocomplete/"
(cd "$stage" && zip -q "$archive" autocomplete/fish_autocomplete)
;;
*.tar.gz)
tar -xzf "$archive" -C "$stage"
cp "$bin/fish_autocomplete" "$stage/autocomplete/"
tar -czf "$archive" -C "$stage" LICENSE autocomplete lk
;;
esac
done

- name: Create checksums
run: cd archives && sha256sum * > checksums.txt && cat checksums.txt

Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,6 @@ jobs:
set -euo pipefail
go test -race -json -v ./... 2>&1 | tee test.log

- name: Verify fish_autocomplete is up to date
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
go build -o /tmp/lk ./cmd/lk
/tmp/lk generate-fish-completion -o /tmp/fish_autocomplete.fresh
if ! diff -u autocomplete/fish_autocomplete /tmp/fish_autocomplete.fresh; then
echo "::error::autocomplete/fish_autocomplete is stale; regenerate with:"
echo " go build -o /tmp/lk ./cmd/lk && /tmp/lk generate-fish-completion -o autocomplete/fish_autocomplete"
exit 1
fi

# The Test step above already fails on a VRT mismatch, but testify's diff of
# a full terminal frame is unreadable and says nothing about how to fix it.
# Re-recording here turns the failure into the diff of what actually moved
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ cmd/lk/testdata/**/uv.lock
# node deps installed for e2e agent fixtures (resolved fresh in CI)
cmd/lk/testdata/**/node_modules
cmd/lk/testdata/**/package-lock.json

# generated at release time by release.yaml
autocomplete/fish_autocomplete
Loading
Loading