File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ before_install:
8
8
- MAX_LINE_LENGTH=100 bash ci/check_line_lengths.sh src/**/*.md
9
9
install :
10
10
- source ~/.cargo/env || true
11
- - bash ci/install.sh
11
+ - bash -x ci/install.sh
12
12
script :
13
- - mdbook build
13
+ - bash -x ci/ build-ignore-timeouts.sh
14
14
- mdbook test
15
15
notifications :
16
16
email :
Original file line number Diff line number Diff line change
1
+
2
+ output=$( mktemp)
3
+
4
+ RUST_LOG=mdbook_linkcheck=debug mdbook build 2>&1 | tee $output
5
+
6
+ result=${PIPESTATUS[0]}
7
+
8
+ # if passed, great!
9
+ if [ " $result " -eq " 0" ] ; then
10
+ exit 0 ;
11
+ fi
12
+
13
+ errors=$( cat $output | sed -n ' s/There \(was\|were\) \([0-9]\+\).*$/\2/p' )
14
+ timeouts=$( cat $output | grep " error while fetching" | wc -l)
15
+
16
+ # if all errors are timeouts, ignore them...
17
+ if [ " $errors " -eq " $timeouts " ] ; then
18
+ echo " Ignoring $timeouts timeouts" ;
19
+ exit 0;
20
+ else
21
+ echo " Non-timeout errors found" ;
22
+ exit 1;
23
+ fi
You can’t perform that action at this time.
0 commit comments