deploy-board-ui-20261112.sh 1.3 KB

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. if [[ $# -ne 1 || "$1" != /opt/kangshifu-web ]]; then
  4. echo 'Usage: bash scripts/deploy-board-ui-20261112.sh /opt/kangshifu-web' >&2
  5. exit 2
  6. fi
  7. cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
  8. umask 022
  9. node -e 'if(Number(process.versions.node.split(".")[0])<20)process.exit(1)'
  10. results_dir="$(mktemp -d /opt/ksf-board-ui-20261112-results-XXXXXXXX)"
  11. node scripts/preflight-mime-mjs.mjs --origin https://kangshifu.fmode.cn --target-dir "$1" | tee "$results_dir/mime-preflight.json"
  12. node --test test/board-local-deploy.test.mjs test/board-ui-deploy.test.mjs test/mjs-mime-preflight.test.mjs | tee "$results_dir/deploy-tests.txt"
  13. node scripts/publish-board-ui-20261112.mjs --target-dir "$1" | tee "$results_dir/frontend-plan.json"
  14. node scripts/publish-board-ui-20261112.mjs --target-dir "$1" --apply | tee "$results_dir/frontend-apply.json"
  15. node scripts/publish-board-ui-20261112.mjs --target-dir "$1" | tee "$results_dir/frontend-noop.json"
  16. node scripts/verify-board-local-public.mjs --manifest deploy/board-ui-20261112.json | tee "$results_dir/public-verification.json"
  17. node scripts/verify-modules.mjs https://kangshifu.fmode.cn/ --json | tee "$results_dir/module-verification.json"
  18. echo "UI deployment complete. Browser acceptance remains required. Receipts: $results_dir"