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