Skip to content

Commit

Permalink
Merge pull request #1310 from ehuss/linkcheck-script
Browse files Browse the repository at this point in the history
Use rust-lang/rust linkchecker on CI.
  • Loading branch information
steveklabnik committed Mar 14, 2020
2 parents b7c9cd9 + c657311 commit cb369ae
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
sudo: false
language: rust
cache: cargo
rust:
- nightly
branches:
only:
- master
before_script:
- |
LATEST=$(cargo search mdbook | grep "^mdbook =" | cut -d '"' -f 2)
INSTALLED=$(cargo install --list | grep "^mdbook " | cut -d v -f 2 | tr -d :)
if [ "$INSTALLED" != "$LATEST" ]; then
if [ "$INSTALLED" != "" ]; then
echo "mdbook '$INSTALLED' is already installed"
fi
echo "Installing mdbook '$LATEST'"
cargo install mdbook --force --vers "$LATEST"
fi
set -ex
rustup --version
rustc -Vv
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.3.5/mdbook-v0.3.5-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=$HOME/.cargo/bin
mdbook --version
rustup toolchain update nightly -c rust-docs
script:
- mdbook build
- mdbook test
- |
set -e
curl -sSLo linkcheck.sh \
https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
sh linkcheck.sh --all rust-by-example

0 comments on commit cb369ae

Please sign in to comment.