From 16e931f43efcaead37d24d241659f109830f55be Mon Sep 17 00:00:00 2001 From: Amanjeev Sethi Date: Wed, 2 Oct 2019 20:12:26 -0400 Subject: [PATCH] Refactor (build CI script): minimizes the script, thanks to mark-i-m --- ci/build.sh | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/ci/build.sh b/ci/build.sh index 39548484..504957b3 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -1,22 +1,10 @@ #!/bin/bash -x -set -o pipefail - -output=$(mktemp) +set -e mkdir -p book/ cp -r $HOME/linkcheck/ book/ -RUST_LOG=mdbook_linkcheck=debug mdbook-linkcheck -s 2>&1 | tee -a $output -result=${PIPESTATUS[0]} +RUST_LOG=mdbook_linkcheck=debug mdbook-linkcheck -s cp -r book/linkcheck $HOME/ mdbook build - -# if passed, great! -if [ "$result" -eq "0" ] ; then - echo "Linkchecks passed" - exit 0 ; -else - echo "Linkchecks failed" - exit 1 ; -fi