CI: Use branch-versioned cargo throughout

This commit is contained in:
Trent Nelson
2020-10-12 21:19:41 -06:00
committed by mergify[bot]
parent dd54ea78ac
commit 66c3c6c2b3
10 changed files with 56 additions and 41 deletions

View File

@ -2,13 +2,14 @@
set -e
cd "$(dirname "$0")"
cargo="$(readlink -f "./cargo")"
# shellcheck source=ci/rust-version.sh
source ../ci/rust-version.sh stable
: "${rust_stable:=}" # Pacify shellcheck
usage=$(cargo +"$rust_stable" -q run -p solana-cli -- -C ~/.foo --help | sed -e 's|'"$HOME"'|~|g' -e 's/[[:space:]]\+$//')
usage=$("$cargo" stable -q run -p solana-cli -- -C ~/.foo --help | sed -e 's|'"$HOME"'|~|g' -e 's/[[:space:]]\+$//')
out=${1:-src/cli/usage.md}
@ -36,6 +37,6 @@ in_subcommands=0
while read -r subcommand rest; do
[[ $subcommand == "SUBCOMMANDS:" ]] && in_subcommands=1 && continue
if ((in_subcommands)); then
section "$(cargo +"$rust_stable" -q run -p solana-cli -- help "$subcommand" | sed -e 's|'"$HOME"'|~|g' -e 's/[[:space:]]\+$//')" "####" >> "$out"
section "$("$cargo" stable -q run -p solana-cli -- help "$subcommand" | sed -e 's|'"$HOME"'|~|g' -e 's/[[:space:]]\+$//')" "####" >> "$out"
fi
done <<<"$usage">>"$out"