Skip to content

Commit f5e11cd

Browse files
committed
Add env. variable support
1 parent 8a69351 commit f5e11cd

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

Diff for: README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,21 @@ The build files are found in the `book/html` directory.
5959
We use `mdbook-linkcheck2` to validate URLs included in our documentation.
6060
`linkcheck` will be run automatically when you build with the instructions in the section above.
6161

62+
> [!NOTE]
63+
> The link validation can be skipped by setting the following environment variable:
64+
> `SKIP_LINKCHECK=1 mdbook ...`
65+
6266
### Table of Contents
6367

6468
We use `mdbook-toc` to auto-generate TOCs for long sections. You can invoke the preprocessor by
6569
including the `<!-- toc -->` marker at the place where you want the TOC.
6670

6771
## How to fix toolstate failures
6872

69-
> **NOTE**: Currently, we do not track the rustc-dev-guide toolstate due to
70-
[spurious failures](https://github.com/rust-lang/rust/pull/71731),
71-
but we leave these instructions for when we do it again in the future.
73+
> [!NOTE]
74+
> Currently, we do not track the rustc-dev-guide toolstate due to
75+
> [spurious failures](https://github.com/rust-lang/rust/pull/71731),
76+
> but we leave these instructions for when we do it again in the future.
7277
7378
1. You will get a ping from the toolstate commit. e.g. https://github.com/rust-lang-nursery/rust-toolstate/commit/8ffa0e4c30ac9ba8546b7046e5c4ccc2b96ebdd4
7479

Diff for: ci/linkcheck.sh

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ set_github_token() {
77
jq '.config.output.linkcheck."http-headers"."github\\.com" = ["Authorization: Bearer $GITHUB_TOKEN"]'
88
}
99

10+
if [ ! -z "$SKIP_LINKCHECK" ] ; then
11+
echo "Skipping link check."
12+
exec mdbook-linkcheck -f ""
13+
fi
14+
1015
# https://docs.github.com/en/actions/reference/environment-variables
1116
if [ "$GITHUB_EVENT_NAME" = "schedule" ] ; then # running in scheduled job
1217
FLAGS=""

0 commit comments

Comments
 (0)