Skip to content

Commit

Permalink
Fail the script if mdbook reports errors (#527)
Browse files Browse the repository at this point in the history
Fail the script if mdbook reports errors
  • Loading branch information
badboy authored Nov 26, 2019
2 parents 3b4fe44 + b5b0b89 commit f720c33
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 f720c33

Please sign in to comment.