File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 3
3
set -e
4
4
set -o pipefail
5
5
6
+ LINKCHECK_BINARY=mdbook-linkcheck2
7
+
6
8
set_github_token () {
7
9
jq ' .config.output.linkcheck."http-headers"."github\\.com" = ["Authorization: Bearer $GITHUB_TOKEN"]'
8
10
}
9
11
10
12
if [ ! -z " $SKIP_LINKCHECK " ] ; then
11
13
echo " Skipping link check."
12
- exec mdbook-linkcheck -f " "
14
+ exec $LINKCHECK_BINARY -f " "
13
15
fi
14
16
15
17
# https://docs.github.com/en/actions/reference/environment-variables
@@ -37,10 +39,10 @@ else # running locally
37
39
echo " Checking files changed in $COMMIT_RANGE : $CHANGED_FILES "
38
40
fi
39
41
40
- echo " exec mdbook-linkcheck2 $FLAGS "
42
+ echo " exec $LINKCHECK_BINARY $FLAGS "
41
43
if [ " $USE_TOKEN " = 1 ]; then
42
44
config=$( set_github_token)
43
- exec mdbook-linkcheck2 $FLAGS <<< " $config"
45
+ exec $LINKCHECK_BINARY $FLAGS <<< " $config"
44
46
else
45
- exec mdbook-linkcheck2 $FLAGS
47
+ exec $LINKCHECK_BINARY $FLAGS
46
48
fi
You can’t perform that action at this time.
0 commit comments