Files
2026-03-29 09:08:01 +08:00

43 lines
1.0 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
usage() {
cat <<'EOF'
用法scripts/status-board.sh [命令]
命令:
render 仅渲染状态板(基于本地缓存/静态信息)
update 跑全量 verify 并写缓存(真机执行)
refresh update + render默认
说明:
- 状态板文件docs/00-04-验证状态板.md
- 本地缓存:.status/verify-results.json已在 .gitignore 忽略)
EOF
}
cmd="${1:-refresh}"
case "$cmd" in
-h|--help|help) usage; exit 0 ;;
render)
python3 "${ROOT}/ansible/tools/status_board.py" render
;;
update)
python3 "${ROOT}/ansible/tools/status_board.py" update --all
;;
refresh|"")
python3 "${ROOT}/ansible/tools/status_board.py" update --all
python3 "${ROOT}/ansible/tools/status_board.py" render
;;
*)
echo "[ERR] unknown cmd: $cmd" >&2
usage
exit 1
;;
esac
echo "[OK] status board updated: ${ROOT}/docs/00-04-验证状态板.md"