diff options
| author | Amanjeev Sethi <aj@amanjeev.com> | 2019-10-02 18:06:30 -0400 |
|---|---|---|
| committer | Who? Me?! <mark-i-m@users.noreply.github.com> | 2019-10-04 16:32:47 -0500 |
| commit | 3e2d38d34153861f0ae6947e6329307a9afdee03 (patch) | |
| tree | 23a401a3aa43ded40a37d725afe2afd43dd5c8f2 /src/doc/rustc-dev-guide/ci | |
| parent | e9abf0071e8e9336fc3cc9bdc0a6c00c15202c9a (diff) | |
| download | rust-3e2d38d34153861f0ae6947e6329307a9afdee03.tar.gz rust-3e2d38d34153861f0ae6947e6329307a9afdee03.zip | |
Fix (build CI script): fails early if linkcheck fails
Diffstat (limited to 'src/doc/rustc-dev-guide/ci')
| -rwxr-xr-x | src/doc/rustc-dev-guide/ci/build.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/doc/rustc-dev-guide/ci/build.sh b/src/doc/rustc-dev-guide/ci/build.sh index b0fae1240b1..3954848419d 100755 --- a/src/doc/rustc-dev-guide/ci/build.sh +++ b/src/doc/rustc-dev-guide/ci/build.sh @@ -1,17 +1,22 @@ #!/bin/bash -x +set -o pipefail + output=$(mktemp) mkdir -p book/ cp -r $HOME/linkcheck/ book/ RUST_LOG=mdbook_linkcheck=debug mdbook-linkcheck -s 2>&1 | tee -a $output +result=${PIPESTATUS[0]} cp -r book/linkcheck $HOME/ mdbook build -result=${PIPESTATUS[0]} - # if passed, great! if [ "$result" -eq "0" ] ; then + echo "Linkchecks passed" exit 0 ; +else + echo "Linkchecks failed" + exit 1 ; fi |
