From 0ef87821f240bb9d4434367e7dcc17e89e6d1bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Sun, 21 Apr 2024 01:57:09 +1200 Subject: [PATCH] Run manpage and completions in release when we've already built in releases --- .github/workflows/release-cli.yml | 13 ++++--------- bin/completions | 12 ++++++------ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index 8862bda..54e8ef8 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -196,19 +196,14 @@ jobs: with: tool: cross - - name: Build (cargo) - if: "!matrix.cross" - run: cargo build --package watchexec-cli --release --locked --target ${{ matrix.target }} - - - name: Build (cross) - if: matrix.cross - run: cross build --package watchexec-cli --release --locked --target ${{ matrix.target }} + - name: Build + run: ${{ matrix.cross && 'cross' || 'cargo' }} build --package watchexec-cli --release --locked --target ${{ matrix.target }} - name: Make manpage - run: cargo run -p watchexec-cli -- --manual > doc/watchexec.1 + run: cargo run -p watchexec-cli ${{ matrix.cross && '' || '--release' }} -- --manual > doc/watchexec.1 - name: Make completions - run: bin/completions + run: bin/completions ${{ matrix.cross && '' || '--release' }} - name: Package shell: bash diff --git a/bin/completions b/bin/completions index aae7844..76693a0 100755 --- a/bin/completions +++ b/bin/completions @@ -1,7 +1,7 @@ #!/bin/sh -cargo run -p watchexec-cli -- --completions bash > completions/bash -cargo run -p watchexec-cli -- --completions elvish > completions/elvish -cargo run -p watchexec-cli -- --completions fish > completions/fish -cargo run -p watchexec-cli -- --completions nu > completions/nu -cargo run -p watchexec-cli -- --completions powershell > completions/powershell -cargo run -p watchexec-cli -- --completions zsh > completions/zsh +cargo run -p watchexec-cli $* -- --completions bash > completions/bash +cargo run -p watchexec-cli $* -- --completions elvish > completions/elvish +cargo run -p watchexec-cli $* -- --completions fish > completions/fish +cargo run -p watchexec-cli $* -- --completions nu > completions/nu +cargo run -p watchexec-cli $* -- --completions powershell > completions/powershell +cargo run -p watchexec-cli $* -- --completions zsh > completions/zsh