diff options
| author | Martin Liška <martin.liska@hey.com> | 2024-12-29 00:00:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-28 15:00:32 -0800 |
| commit | e19542f0a93149c5f5cd170f39ec8d2348bfc75f (patch) | |
| tree | adb15e6ba52f9912beb697beb1659882b0300665 /src/doc/rustc-dev-guide | |
| parent | 1a99d3bafa592c6f8f057914bccbf0d4a8473849 (diff) | |
| download | rust-e19542f0a93149c5f5cd170f39ec8d2348bfc75f.tar.gz rust-e19542f0a93149c5f5cd170f39ec8d2348bfc75f.zip | |
Start using mdbook-linkcheck2 (#2103)
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/.github/workflows/ci.yml | 6 | ||||
| -rw-r--r-- | src/doc/rustc-dev-guide/README.md | 4 | ||||
| -rwxr-xr-x | src/doc/rustc-dev-guide/ci/linkcheck.sh | 12 |
3 files changed, 8 insertions, 14 deletions
diff --git a/src/doc/rustc-dev-guide/.github/workflows/ci.yml b/src/doc/rustc-dev-guide/.github/workflows/ci.yml index 0132d6983e8..f7bfb77a33e 100644 --- a/src/doc/rustc-dev-guide/.github/workflows/ci.yml +++ b/src/doc/rustc-dev-guide/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest env: MDBOOK_VERSION: 0.4.21 - MDBOOK_LINKCHECK_VERSION: 0.7.6 + MDBOOK_LINKCHECK2_VERSION: 0.8.1 MDBOOK_MERMAID_VERSION: 0.12.6 MDBOOK_TOC_VERSION: 0.11.2 DEPLOY_DIR: book/html @@ -33,7 +33,7 @@ jobs: with: path: | ~/.cargo/bin - key: ${{ runner.os }}-${{ env.MDBOOK_VERSION }}--${{ env.MDBOOK_LINKCHECK_VERSION }}--${{ env.MDBOOK_TOC_VERSION }}--${{ env.MDBOOK_MERMAID_VERSION }} + key: ${{ runner.os }}-${{ env.MDBOOK_VERSION }}--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ env.MDBOOK_TOC_VERSION }}--${{ env.MDBOOK_MERMAID_VERSION }} - name: Cache linkcheck uses: actions/cache@v4 @@ -52,7 +52,7 @@ jobs: if: steps.mdbook-cache.outputs.cache-hit != 'true' run: | cargo install mdbook --version ${{ env.MDBOOK_VERSION }} - cargo install mdbook-linkcheck --version ${{ env.MDBOOK_LINKCHECK_VERSION }} + cargo install mdbook-linkcheck2 --version ${{ env.MDBOOK_LINKCHECK2_VERSION }} cargo install mdbook-toc --version ${{ env.MDBOOK_TOC_VERSION }} cargo install mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }} diff --git a/src/doc/rustc-dev-guide/README.md b/src/doc/rustc-dev-guide/README.md index 500dcf9e43b..599de487b81 100644 --- a/src/doc/rustc-dev-guide/README.md +++ b/src/doc/rustc-dev-guide/README.md @@ -43,7 +43,7 @@ rustdocs][rustdocs]. To build a local static HTML site, install [`mdbook`](https://github.com/rust-lang/mdBook) with: ``` -> cargo install mdbook mdbook-linkcheck mdbook-toc mdbook-mermaid +> cargo install mdbook mdbook-linkcheck2 mdbook-toc mdbook-mermaid ``` and execute the following command in the root of the repository: @@ -56,7 +56,7 @@ The build files are found in the `book/html` directory. ### Link Validations -We use `mdbook-linkcheck` to validate URLs included in our documentation. +We use `mdbook-linkcheck2` to validate URLs included in our documentation. `linkcheck` will be run automatically when you build with the instructions in the section above. ### Table of Contents diff --git a/src/doc/rustc-dev-guide/ci/linkcheck.sh b/src/doc/rustc-dev-guide/ci/linkcheck.sh index 5f523f8743d..b3d8a444402 100755 --- a/src/doc/rustc-dev-guide/ci/linkcheck.sh +++ b/src/doc/rustc-dev-guide/ci/linkcheck.sh @@ -14,9 +14,6 @@ if [ "$GITHUB_EVENT_NAME" = "schedule" ] ; then # running in scheduled job echo "Doing full link check." elif [ "$GITHUB_EVENT_NAME" = "pull_request" ] ; then # running in PR CI build - echo "*** WARNING: linkcheck temporarily disabled due to bugs ***" - exit 0 - if [ -z "$BASE_SHA" ]; then echo "error: unexpected state: BASE_SHA must be non-empty in CI" exit 1 @@ -28,9 +25,6 @@ elif [ "$GITHUB_EVENT_NAME" = "pull_request" ] ; then # running in PR CI build echo "Checking files changed since $BASE_SHA: $CHANGED_FILES" else # running locally - echo "*** WARNING: linkcheck temporarily disabled due to bugs ***" - exit 0 - COMMIT_RANGE=master... CHANGED_FILES=$(git diff --name-only $COMMIT_RANGE | sed 's#^src/##' | tr '\n' ' ') FLAGS="-f $CHANGED_FILES" @@ -38,10 +32,10 @@ else # running locally echo "Checking files changed in $COMMIT_RANGE: $CHANGED_FILES" fi -echo "exec mdbook-linkcheck $FLAGS" +echo "exec mdbook-linkcheck2 $FLAGS" if [ "$USE_TOKEN" = 1 ]; then config=$(set_github_token) - exec mdbook-linkcheck $FLAGS <<<"$config" + exec mdbook-linkcheck2 $FLAGS <<<"$config" else - exec mdbook-linkcheck $FLAGS + exec mdbook-linkcheck2 $FLAGS fi |
