Skip to content

Commit

Permalink
Fail the script if mdbook reports errors
Browse files Browse the repository at this point in the history
  • Loading branch information
badboy committed Nov 26, 2019
1 parent 3b4fe44 commit b5b0b89
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions bin/build-rust-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@ set -e

CRATE_NAME=glean_core

pushd docs &&
mdbook build |& grep "\[ERROR\]" &&
if [ $? -eq 0 ]
then
exit 1
else
exit 0
fi
popd
output=$(mdbook build docs/ 2>&1)
if echo "$output" | grep -q "\[ERROR\]" ; then
exit 1
fi

cargo doc --no-deps

Expand Down

0 comments on commit b5b0b89

Please sign in to comment.