Refactor (build CI script): minimizes the script, thanks to mark-i-m
This commit is contained in:
parent
bbaf50ac29
commit
16e931f43e
16
ci/build.sh
16
ci/build.sh
|
|
@ -1,22 +1,10 @@
|
||||||
#!/bin/bash -x
|
#!/bin/bash -x
|
||||||
|
|
||||||
set -o pipefail
|
set -e
|
||||||
|
|
||||||
output=$(mktemp)
|
|
||||||
|
|
||||||
mkdir -p book/
|
mkdir -p book/
|
||||||
cp -r $HOME/linkcheck/ book/
|
cp -r $HOME/linkcheck/ book/
|
||||||
RUST_LOG=mdbook_linkcheck=debug mdbook-linkcheck -s 2>&1 | tee -a $output
|
RUST_LOG=mdbook_linkcheck=debug mdbook-linkcheck -s
|
||||||
result=${PIPESTATUS[0]}
|
|
||||||
cp -r book/linkcheck $HOME/
|
cp -r book/linkcheck $HOME/
|
||||||
|
|
||||||
mdbook build
|
mdbook build
|
||||||
|
|
||||||
# if passed, great!
|
|
||||||
if [ "$result" -eq "0" ] ; then
|
|
||||||
echo "Linkchecks passed"
|
|
||||||
exit 0 ;
|
|
||||||
else
|
|
||||||
echo "Linkchecks failed"
|
|
||||||
exit 1 ;
|
|
||||||
fi
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue