- beads-release formula: drop the snapshot-docs step (ran the deleted scripts/snapshot-release-docs.sh on the critical needs-chain); stamp- changelog now needs update-vendorhash - update-versions.sh: remove the mangled --skip-docs/docs-snapshot logic and garbled usage text left by mid-line deletions - pre-push hook: drop the snapshot-script remediation hint - release.yml: collapse the prerelease branch; BEADS_REQUIRE_RELEASE_DOCS has no consumer since check-docs-version.sh was deleted - RELEASING.md / scripts/docs.md: describe the current pipeline (no --versioned, no website/ outputs, no check-docs-version.sh) - docs-mintlify.yml: paths filter now includes engdocs/** and the curated root markdown files the docsync guard validates - docs-render-check.sh: pin mint@4.2.687, fail closed when mint dies without producing a broken-links report, parse report lines only, drop dead extract_page_links(), fix the stale jq requirement; mint.sh pins the same version - nightly.yml: remove the deleted website measurement suite option - CODEOWNERS: init-safety ADR gate follows the file to engdocs/adr/ - beads-docs skill: align with settled decision 6 — no pointer stubs, moved pages get docs.json redirects; bd's printed paths are fixed at the source - CHANGELOG (edited line), FEDERATION-SETUP, README, examples, oracle-a, .buildflags, gh-issue-to-pr formula: retarget moved-file references; anchor the build/ gitignore pattern
65 lines
1.5 KiB
Bash
Executable file
65 lines
1.5 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Local preview for the Mintlify docs site under docs/.
|
|
# Usage: ./mint.sh [dev|broken-links|...] (defaults to dev)
|
|
set -euo pipefail
|
|
|
|
repo_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
|
docs_dir="$repo_dir/docs"
|
|
# Pinned so local preview and CI parse the same tool (keep in sync with
|
|
# .github/scripts/docs-render-check.sh).
|
|
MINT_VERSION="${MINT_VERSION:-4.2.687}"
|
|
args=("$@")
|
|
if [[ ${#args[@]} -eq 0 ]]; then
|
|
args=(dev)
|
|
fi
|
|
|
|
node_major() {
|
|
node -p 'process.versions.node.split(".")[0]' 2>/dev/null || true
|
|
}
|
|
|
|
find_node22_bin() {
|
|
local prefix
|
|
for prefix in /opt/homebrew/opt/node@22 /usr/local/opt/node@22; do
|
|
if [[ -x "$prefix/bin/node" ]]; then
|
|
printf '%s/bin\n' "$prefix"
|
|
return 0
|
|
fi
|
|
done
|
|
|
|
if command -v brew >/dev/null 2>&1; then
|
|
prefix=$(brew --prefix node@22 2>/dev/null || true)
|
|
if [[ -n "$prefix" && -x "$prefix/bin/node" ]]; then
|
|
printf '%s/bin\n' "$prefix"
|
|
return 0
|
|
fi
|
|
fi
|
|
|
|
return 1
|
|
}
|
|
|
|
major=$(node_major)
|
|
if [[ "$major" =~ ^[0-9]+$ ]] && (( major < 25 )); then
|
|
cd "$docs_dir"
|
|
exec npx --yes "mint@$MINT_VERSION" "${args[@]}"
|
|
fi
|
|
|
|
if node22_bin=$(find_node22_bin); then
|
|
export PATH="$node22_bin:$PATH"
|
|
cd "$docs_dir"
|
|
exec npx --yes "mint@$MINT_VERSION" "${args[@]}"
|
|
fi
|
|
|
|
cat >&2 <<EOF
|
|
Mintlify does not support Node 25+.
|
|
|
|
Use Node 22 LTS to preview the docs. For example:
|
|
nvm use 22
|
|
fnm use 22
|
|
volta install node@22
|
|
|
|
On macOS with Homebrew:
|
|
brew install node@22
|
|
cd "$repo_dir"
|
|
PATH="/opt/homebrew/opt/node@22/bin:\$PATH" ./mint.sh dev
|
|
EOF
|
|
exit 1
|