Artifact 9cd1dc435ab534086241a24e2e3512fa92ba7bf625843348879e29e2f6c89e7c:
- Executable file
scripts/check-docs-generated.sh
— part of check-in
[d7fd910ffc]
at
2026-10-23 21:12:43
on branch main
— docs: generate the site's data, CLI reference and llms.txt from the code
tools/docsgen/engine records one check-in as an artifact, as its derived rows and as the cards of a pull, from a real engine run with fixed inputs. tools/docsgen/conformance turns TestCoverage's report into per-draft and per-requirement data. scripts/gen-cli-docs.sh writes one page per command group from the libfossil binary's --help. gen-llms-txt.sh and check-llms-txt.sh are ported from dagnats, and sync-version.sh now takes the highest release tag and writes the go.mod version too.
scripts/check-docs-generated.sh regenerates everything into a scratch dir and fails on any difference; make docs-check and the test-docs CI job run it. (user: [email protected], size: 1284) [annotate] [blame] [check-ins using] [more...]
#!/usr/bin/env bash # Fails when a generated docs input differs from what is committed: the hero # figure and conformance data, the CLI reference and llms*.txt. Regenerates # everything into a scratch dir with scripts/gen-docs.sh and compares. Run # from the repo root (CI and `make docs-check` do). Fix a failure with # `make docs-gen` and commit the result. set -euo pipefail work="$(mktemp -d)" trap 'rm -rf "$work"' EXIT INT TERM DATA_DIR="$work/data" CLI_DIR="$work/cli" LLMS_DIR="$work/static" \ ./scripts/gen-docs.sh >/dev/null fail=0 for f in engine.json conformance.json facts.json; do if ! diff -u "docs/site/data/$f" "$work/data/$f" >&2; then echo "check-docs-generated: docs/site/data/$f is stale" >&2 fail=1 fi done if ! diff -ru docs/site/content/docs/reference/cli "$work/cli" >&2; then echo "check-docs-generated: docs/site/content/docs/reference/cli/ is stale" >&2 fail=1 fi for f in llms.txt llms-full.txt; do if ! diff -u "docs/site/static/$f" "$work/static/$f" >&2; then echo "check-docs-generated: docs/site/static/$f is stale" >&2 fail=1 fi done if [ "$fail" -ne 0 ]; then echo "check-docs-generated: run 'make docs-gen' and commit the result" >&2 exit 1 fi echo "check-docs-generated: ok"