Skip to content

Commit b5273be

Browse files
committed
gh-actions: Make sure shell completions are updated
Or error in CI if not. Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent ac977f7 commit b5273be

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,16 @@ jobs:
179179
- name: Run cargo clippy
180180
run: cargo clippy -p framework_lib -p framework_tool -- -D warnings
181181

182+
- name: Check shell completions are up to date
183+
run: |
184+
cargo build -p framework_tool
185+
./target/debug/framework_tool --generate-completions bash > /tmp/bash_completions
186+
./target/debug/framework_tool --generate-completions zsh > /tmp/zsh_completions
187+
./target/debug/framework_tool --generate-completions fish > /tmp/fish_completions
188+
diff completions/bash/framework_tool /tmp/bash_completions || { echo "Shell completions are out of date. See completions/README.md for regeneration instructions."; exit 1; }
189+
diff completions/zsh/_framework_tool /tmp/zsh_completions || { echo "Shell completions are out of date. See completions/README.md for regeneration instructions."; exit 1; }
190+
diff completions/fish/framework_tool.fish /tmp/fish_completions || { echo "Shell completions are out of date. See completions/README.md for regeneration instructions."; exit 1; }
191+
182192
# Just make sure doc generation works
183193
doc:
184194
name: Generate docs

0 commit comments

Comments
 (0)