mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-26 05:44:26 +00:00
Rollup merge of #85977 - ehuss:linkcheck-nightly, r=Mark-Simulacrum
Fix linkcheck script from getting out of sync. When there are changes to the linkcheck script, the CI jobs used in the books would download the latest version on master, but run it against nightly. During that 24 hour window, the CI can fail if the script has changes that are incompatible with the last nightly. This fixes it so that it downloads the linkchecker that matches the version of nightly. This also includes a fix to build with release to make it run much faster (I forgot to add this in #85652).
This commit is contained in:
commit
edb8f653e7
@ -85,11 +85,11 @@ fi
|
||||
if [ ! -e "linkchecker/main.rs" ] || [ "$iterative" = "0" ]
|
||||
then
|
||||
echo "Downloading linkchecker source..."
|
||||
nightly_hash=$(rustc +nightly -Vv | grep commit-hash | cut -f2 -d" ")
|
||||
url="https://raw.githubusercontent.com/rust-lang/rust"
|
||||
mkdir linkchecker
|
||||
curl -o linkchecker/Cargo.toml \
|
||||
https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/Cargo.toml
|
||||
curl -o linkchecker/main.rs \
|
||||
https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/main.rs
|
||||
curl -o linkchecker/Cargo.toml ${url}/${nightly_hash}/src/tools/linkchecker/Cargo.toml
|
||||
curl -o linkchecker/main.rs ${url}/${nightly_hash}/src/tools/linkchecker/main.rs
|
||||
fi
|
||||
|
||||
echo "Building book \"$book_name\"..."
|
||||
@ -106,7 +106,7 @@ else
|
||||
check_path="linkcheck/$book_name"
|
||||
fi
|
||||
echo "Running linkchecker on \"$check_path\"..."
|
||||
cargo run --manifest-path=linkchecker/Cargo.toml -- "$check_path"
|
||||
cargo run --release --manifest-path=linkchecker/Cargo.toml -- "$check_path"
|
||||
|
||||
if [ "$iterative" = "0" ]
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user