We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbe31d4 commit 7b699b9Copy full SHA for 7b699b9
ci/build-ignore-timeouts.sh
@@ -0,0 +1,29 @@
1
+#!/bin/bash -x
2
+
3
+output=$(mktemp)
4
5
+mkdir -p book/
6
+cp -r $HOME/linkcheck/ book/
7
+RUST_LOG=mdbook_linkcheck=debug mdbook-linkcheck -s 2>&1 | tee -a $output
8
+cp -r book/linkcheck $HOME/
9
10
+mdbook build
11
12
+result=${PIPESTATUS[0]}
13
14
+# if passed, great!
15
+if [ "$result" -eq "0" ] ; then
16
+ exit 0 ;
17
+fi
18
19
+errors=$(cat $output | sed -n 's/There \(was\|were\) \([0-9]\+\).*$/\2/p')
20
+timeouts=$(cat $output | grep "error while fetching" | wc -l)
21
22
+# if all errors are timeouts, ignore them...
23
+if [ "$errors" -eq "$timeouts" ] ; then
24
+ echo "Ignoring $timeouts timeouts";
25
+ exit 0;
26
+else
27
+ echo "Non-timeout errors found";
28
+ exit 1;
29
0 commit comments