diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-06-04 13:43:06 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-04 13:43:06 +0900 |
| commit | edb8f653e768361eb6191b5bbe2f31087394d79d (patch) | |
| tree | 1c5142ab39dda78eb1444f9676ca8d4c92070f11 /src | |
| parent | 0a124319625b4415fc8ca567b9ad07fa190658c8 (diff) | |
| parent | 095f09a5bf1433ca4003728fd95682dd34b19dca (diff) | |
| download | rust-edb8f653e768361eb6191b5bbe2f31087394d79d.tar.gz rust-edb8f653e768361eb6191b5bbe2f31087394d79d.zip | |
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).
Diffstat (limited to 'src')
| -rwxr-xr-x | src/tools/linkchecker/linkcheck.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/linkchecker/linkcheck.sh b/src/tools/linkchecker/linkcheck.sh index b68053c76be..9eeebf444a4 100755 --- a/src/tools/linkchecker/linkcheck.sh +++ b/src/tools/linkchecker/linkcheck.sh @@ -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 |
