take rust version from toolchain file (#29320)
* take rust version from toolchain file * add quotes to pacify shellcheck
This commit is contained in:
parent
a0b655b72b
commit
cdb204114e
|
@ -10,7 +10,7 @@ if [[ -n $APPVEYOR ]]; then
|
||||||
|
|
||||||
appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
|
appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
|
||||||
export USERPROFILE="D:\\"
|
export USERPROFILE="D:\\"
|
||||||
./rustup-init -yv --default-toolchain $rust_stable --default-host x86_64-pc-windows-msvc
|
./rustup-init -yv --default-toolchain "$rust_stable" --default-host x86_64-pc-windows-msvc
|
||||||
export PATH="$PATH:/d/.cargo/bin"
|
export PATH="$PATH:/d/.cargo/bin"
|
||||||
rustc -vV
|
rustc -vV
|
||||||
cargo -vV
|
cargo -vV
|
||||||
|
|
|
@ -18,7 +18,12 @@
|
||||||
if [[ -n $RUST_STABLE_VERSION ]]; then
|
if [[ -n $RUST_STABLE_VERSION ]]; then
|
||||||
stable_version="$RUST_STABLE_VERSION"
|
stable_version="$RUST_STABLE_VERSION"
|
||||||
else
|
else
|
||||||
stable_version=1.65.0
|
# read rust version from rust-toolchain.toml file
|
||||||
|
base="$(dirname "${BASH_SOURCE[0]}")"
|
||||||
|
# pacify shellcheck: cannot follow dynamic path
|
||||||
|
# shellcheck disable=SC1090,SC1091
|
||||||
|
source "$base/../scripts/read-cargo-variable.sh"
|
||||||
|
stable_version=$(readCargoVariable channel "$base/../rust-toolchain.toml")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n $RUST_NIGHTLY_VERSION ]]; then
|
if [[ -n $RUST_NIGHTLY_VERSION ]]; then
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[toolchain]
|
||||||
|
channel = "1.65.0"
|
Loading…
Reference in New Issue