Skip to content

Commit be5423d

Browse files
committed
CI: Don't stall doc/build.sh link checker on problematic links
1 parent 6319193 commit be5423d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc/build.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ fi
6767
echo
6868
echo 'Testing for broken links'
6969
echo
70+
problematic_urls='
71+
https://www.gnu.org/licenses/agpl-3.0.html
72+
'
7073
pushd "$BUILDROOT" >/dev/null
7174
WEBSITE='https://kernc\.github\.io/backtesting\.py'
7275
grep -PR '<a .*?href=' |
@@ -95,7 +98,10 @@ print(html.unescape(unquote(sys.argv[-1])))' "$url")"
9598
if [ -f "$target_file" ]; then continue; fi
9699

97100
url="${url// /%20}"
98-
curl --silent --fail --retry 5 --retry-delay 5 --user-agent 'Mozilla/5.0 Firefox 101' "$url" >/dev/null 2>&1 ||
101+
echo "$url"
102+
curl --silent --fail --retry 2 --retry-delay 2 --connect-timeout 10 \
103+
--user-agent 'Mozilla/5.0 Firefox 128' "$url" >/dev/null 2>&1 ||
104+
grep -qF "$url" <(echo "$problematic_urls") ||
99105
die "broken link in $file: $url"
100106
done
101107
done

0 commit comments

Comments
 (0)