Skip to content

Commit 341a486

Browse files
committed
Use the new component dependency option of the rust-toolchain file (take 2)
1 parent 0533913 commit 341a486

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

prepare.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
rustup component add rust-src rustc-dev llvm-tools-preview
54
./build_sysroot/prepare_sysroot_src.sh
65
cargo install hyperfine || echo "Skipping hyperfine install"
76

rust-toolchain

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
nightly-2021-03-05
1+
[toolchain]
2+
channel = "nightly-2021-03-05"
3+
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

scripts/cargo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dir=$(dirname "$0")
44
source "$dir/config.sh"
55

66
# read nightly compiler from rust-toolchain file
7-
TOOLCHAIN=$(cat "$dir/rust-toolchain")
7+
TOOLCHAIN=$(cat "$dir/rust-toolchain" | grep channel | sed "s/channel = \"\(.*\)\"/\1/")
88

99
cmd=$1
1010
shift || true

scripts/rustup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ case $1 in
88

99
echo "=> Installing new nightly"
1010
rustup toolchain install --profile minimal "nightly-${TOOLCHAIN}" # Sanity check to see if the nightly exists
11-
echo "nightly-${TOOLCHAIN}" > rust-toolchain
11+
sed -i "s/\"nightly-.*\"/\"nightly-${TOOLCHAIN}\"/" rust-toolchain
1212
rustup component add rustfmt || true
1313

1414
echo "=> Uninstalling all old nighlies"

0 commit comments

Comments
 (0)