feat: only update toolchain if it is 'nightly'
This commit is contained in:
parent
6ffa2b739c
commit
f710a77230
1 changed files with 2 additions and 2 deletions
|
@ -15,6 +15,8 @@ echo "Default toolchain: ${TOOLCHAIN}"
|
||||||
if test "${ARGS[0]}" == "nightly"; then
|
if test "${ARGS[0]}" == "nightly"; then
|
||||||
TOOLCHAIN="nightly"
|
TOOLCHAIN="nightly"
|
||||||
ARGS=("${ARGS[@]:1}")
|
ARGS=("${ARGS[@]:1}")
|
||||||
|
echo ">>> Update nightly toolchain"
|
||||||
|
rustup update "${TOOLCHAIN}"
|
||||||
fi
|
fi
|
||||||
if test "${ARGS[0]}" == "stable"; then
|
if test "${ARGS[0]}" == "stable"; then
|
||||||
TOOLCHAIN="stable" # redundant as this is the default
|
TOOLCHAIN="stable" # redundant as this is the default
|
||||||
|
@ -26,8 +28,6 @@ if [[ "${ARGS[0]}" == v1* ]]; then
|
||||||
fi
|
fi
|
||||||
echo "Selected toolchain: ${TOOLCHAIN}"
|
echo "Selected toolchain: ${TOOLCHAIN}"
|
||||||
|
|
||||||
echo ">>> Update toolchain"
|
|
||||||
rustup update "${TOOLCHAIN}"
|
|
||||||
echo ">>> Install rustfmt and clippy"
|
echo ">>> Install rustfmt and clippy"
|
||||||
rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy
|
rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue