mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
Auto merge of #4713 - lzutao:no-reinstall-toolchain, r=phansch
build: do not reinstall master toolchain if it is up-to-date changelog: none
This commit is contained in:
commit
37ea436821
1 changed files with 9 additions and 2 deletions
|
@ -6,8 +6,15 @@ set -e
|
|||
cd "$(dirname "$0")"
|
||||
|
||||
if [[ "$CI" == true ]] || ! command -v rustup-toolchain-install-master > /dev/null; then
|
||||
cargo install -Z install-upgrade rustup-toolchain-install-master --bin rustup-toolchain-install-master
|
||||
cargo install -Z install-upgrade rustup-toolchain-install-master --bin rustup-toolchain-install-master
|
||||
fi
|
||||
|
||||
rustup-toolchain-install-master -f -n master -c rustc-dev
|
||||
RUST_COMMIT=$(git ls-remote https://github.com/rust-lang/rust master | awk '{print $1}')
|
||||
|
||||
if rustc +master -Vv 2>/dev/null | grep -q "$RUST_COMMIT"; then
|
||||
echo "info: master toolchain is up-to-date"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
rustup-toolchain-install-master -f -n master -c rustc-dev -- "$RUST_COMMIT"
|
||||
rustup override set master
|
||||
|
|
Loading…
Reference in a new issue