From a6e1c86d8bf61b24bdf87b4a519625efb55ed2cc Mon Sep 17 00:00:00 2001 From: Amanjeev Sethi Date: Wed, 2 Oct 2019 15:36:42 -0400 Subject: [PATCH] Fix (build CI script): * Removes timeout hack because it is not needed because we have upgraded mdbook_linkcheck * Renamed build script because it is no longer ignoring timeouts --- .travis.yml | 2 +- ci/build-ignore-timeouts.sh | 29 ----------------------------- ci/build.sh | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 30 deletions(-) delete mode 100755 ci/build-ignore-timeouts.sh create mode 100755 ci/build.sh diff --git a/.travis.yml b/.travis.yml index c33c38b8..dedec456 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ install: - source ~/.cargo/env || true - bash -x ci/install.sh script: -- bash -x ci/build-ignore-timeouts.sh +- bash -x ci/build.sh - mdbook test notifications: email: diff --git a/ci/build-ignore-timeouts.sh b/ci/build-ignore-timeouts.sh deleted file mode 100755 index 3ec81f62..00000000 --- a/ci/build-ignore-timeouts.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -x - -output=$(mktemp) - -mkdir -p book/ -cp -r $HOME/linkcheck/ book/ -RUST_LOG=mdbook_linkcheck=debug mdbook-linkcheck -s 2>&1 | tee -a $output -cp -r book/linkcheck $HOME/ - -mdbook build - -result=${PIPESTATUS[0]} - -# if passed, great! -if [ "$result" -eq "0" ] ; then - exit 0 ; -fi - -errors=$(cat $output | sed -n 's/There \(was\|were\) \([0-9]\+\).*$/\2/p') -timeouts=$(cat $output | grep "error while fetching" | wc -l) - -# if all errors are timeouts, ignore them... -if [ "$errors" -eq "$timeouts" ] ; then - echo "Ignoring $timeouts timeouts"; - exit 0; -else - echo "Non-timeout errors found"; - exit 1; -fi diff --git a/ci/build.sh b/ci/build.sh new file mode 100755 index 00000000..b0fae124 --- /dev/null +++ b/ci/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash -x + +output=$(mktemp) + +mkdir -p book/ +cp -r $HOME/linkcheck/ book/ +RUST_LOG=mdbook_linkcheck=debug mdbook-linkcheck -s 2>&1 | tee -a $output +cp -r book/linkcheck $HOME/ + +mdbook build + +result=${PIPESTATUS[0]} + +# if passed, great! +if [ "$result" -eq "0" ] ; then + exit 0 ; +fi