Skip to content

Commit

Permalink
ci: replace markdown-link-check with lychee
Browse files Browse the repository at this point in the history
Replace markdown-link-check with lychee to reduce maintenance burden, as
the current version has been broken for 2 months [1].

[1] tcort/markdown-link-check#369

Signed-off-by: Michael Adler <[email protected]>
  • Loading branch information
michaeladler committed Jan 7, 2025
1 parent aee20ca commit dbaabc3
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 33 deletions.
15 changes: 15 additions & 0 deletions .ci/packages/lychee.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2025 Siemens AG
#
# SPDX-License-Identifier: Apache-2.0
#
# Author: Michael Adler <[email protected]>
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

. "$SCRIPT_DIR/versions.env"

echo "Installing lychee $LYCHEE_VERSION"
curl -Ls "https://github.com/lycheeverse/lychee/releases/download/lychee-v${LYCHEE_VERSION}/lychee-x86_64-unknown-linux-musl.tar.gz" |
tar --extract --gzip --directory=/usr/local/bin lychee
14 changes: 0 additions & 14 deletions .ci/packages/markdown-link-check.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .ci/packages/versions.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export PANDOC_VERSION=3.2 # github-releases/jgm/pandoc&versioning=semver
export STATICCHECK_VERSION=2024.1.1 # github-releases/dominikh/go-tools&versioning=loose
export SWAGGER_VERSION=0.31.0 # github-releases/go-swagger/go-swagger&versioning=semver
export ZIG_VERSION=0.13.0 # github-releases/ziglang/zig&versioning=semver
export MARKDOWN_LINK_CHECK_VERSION=3.12.2 # github-releases/tcort/markdown-link-check&versioning=semver
export LYCHEE_VERSION=0.18.0 # github-releases/lycheeverse/lychee&versioning=semver
export SYFT_VERSION=1.18.1 # github-releases/anchore/syft&versioning=semver
export OAPI_CODEGEN_VERSION=2.4.1 # github-releases/oapi-codegen/oapi-codegen&versioning=semver
2 changes: 1 addition & 1 deletion .ci/setup-pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ apt-get install -q -y --no-install-recommends npm imagemagick librsvg2-bin
"$SCRIPT_DIR/packages/hugo.sh"
"$SCRIPT_DIR/packages/just.sh"
"$SCRIPT_DIR/packages/pandoc.sh"
"$SCRIPT_DIR/packages/markdown-link-check.sh"
"$SCRIPT_DIR/packages/lychee.sh"
15 changes: 0 additions & 15 deletions .markdown-link-check.json

This file was deleted.

2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,6 @@ sqlite-generate-schema name:

# Check links used in Markdown files.
check-md-links:
git ls-files "*.md" | xargs -n1 markdown-link-check --config .markdown-link-check.json
git ls-files -z "*.md" | xargs -0 lychee

# vim: ts=4 sw=4 expandtab
8 changes: 8 additions & 0 deletions lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-FileCopyrightText: 2025 Siemens AG
#
# SPDX-License-Identifier: Apache-2.0
#
# Author: Michael Adler <[email protected]>
no_progress = true
exclude_loopback = true
accept = ["200..=204", "429"]
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ mkShell {
htmltest

nodePackages.sql-formatter
nodePackages.markdown-link-check
nodePackages.prettier
nodePackages.markdownlint-cli
shfmt
lychee

go-swagger
golangci-lint
Expand Down

0 comments on commit dbaabc3

Please sign in to comment.