Skip to content

Commit c657311

Browse files
committed
Use rust-lang/rust linkchecker on CI.
1 parent db57f89 commit c657311

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.travis.yml

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
sudo: false
22
language: rust
3-
cache: cargo
43
rust:
54
- nightly
65
branches:
76
only:
87
- master
98
before_script:
109
- |
11-
LATEST=$(cargo search mdbook | grep "^mdbook =" | cut -d '"' -f 2)
12-
INSTALLED=$(cargo install --list | grep "^mdbook " | cut -d v -f 2 | tr -d :)
13-
if [ "$INSTALLED" != "$LATEST" ]; then
14-
if [ "$INSTALLED" != "" ]; then
15-
echo "mdbook '$INSTALLED' is already installed"
16-
fi
17-
echo "Installing mdbook '$LATEST'"
18-
cargo install mdbook --force --vers "$LATEST"
19-
fi
10+
set -ex
11+
rustup --version
12+
rustc -Vv
13+
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
14+
mdbook --version
15+
rustup toolchain update nightly -c rust-docs
2016
script:
2117
- mdbook build
2218
- mdbook test
19+
- |
20+
set -e
21+
curl -sSLo linkcheck.sh \
22+
https://github.com/raw/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
23+
sh linkcheck.sh --all rust-by-example

0 commit comments

Comments
 (0)