Skip to content

Commit

Permalink
Add env. variable support
Browse files Browse the repository at this point in the history
  • Loading branch information
marxin committed Jul 27, 2024
1 parent c74d3fb commit 9667f99
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,21 @@ The build files are found in the `book/html` directory.
We use `mdbook-linkcheck` to validate URLs included in our documentation.
`linkcheck` will be run automatically when you build with the instructions in the section above.

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

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

## How to fix toolstate failures

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

Expand Down
5 changes: 5 additions & 0 deletions ci/linkcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ set_github_token() {
jq '.config.output.linkcheck."http-headers"."github\\.com" = ["Authorization: Bearer $GITHUB_TOKEN"]'
}

if [ ! -z "$SKIP_LINKCHECK" ] ; then
echo "Skipping link check."
exec mdbook-linkcheck -f ""
fi

# https://docs.github.com/en/actions/reference/environment-variables
if [ "$GITHUB_EVENT_NAME" = "schedule" ] ; then # running in scheduled job
FLAGS=""
Expand Down

0 comments on commit 9667f99

Please sign in to comment.