chore: tidy local debug scripts

This commit is contained in:
npc0-hue
2026-07-23 16:09:12 +08:00
parent c07994c417
commit 8cc741ba19
15 changed files with 86 additions and 42 deletions
+6 -6
View File
@@ -2,8 +2,8 @@
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# shellcheck source=scripts/local-debug-env.sh
source "$ROOT_DIR/scripts/local-debug-env.sh"
# shellcheck source=scripts/local-debug/env.sh
source "$ROOT_DIR/scripts/local-debug/env.sh"
export BROWSER_ACCEPTANCE_EVIDENCE_DIR="${BROWSER_ACCEPTANCE_EVIDENCE_DIR:-$LOCAL_DEBUG_ROOT/browser-acceptance}"
export LOCAL_DEBUG_PLATFORM_URL="${LOCAL_DEBUG_PLATFORM_URL:-$(local_debug_platform_url)}"
@@ -16,20 +16,20 @@ cleanup() {
LOCAL_DEBUG_ROOT="$LOCAL_DEBUG_ROOT" \
LOCAL_DEBUG_PLATFORM_PORT="$LOCAL_DEBUG_PLATFORM_PORT" \
LOCAL_DEBUG_WEB_PORT="$LOCAL_DEBUG_WEB_PORT" \
"$ROOT_DIR/scripts/local-debug-stop.sh" >/dev/null 2>&1 || true
"$ROOT_DIR/scripts/dev-stop.sh" >/dev/null 2>&1 || true
fi
}
if [[ "$SELF_STARTED" == "true" ]]; then
trap cleanup EXIT
"$ROOT_DIR/scripts/local-debug-reset.sh"
"$ROOT_DIR/scripts/local-debug-start.sh"
"$ROOT_DIR/scripts/dev-reset.sh"
"$ROOT_DIR/scripts/dev-start.sh"
else
curl -fsS "$LOCAL_DEBUG_PLATFORM_URL/healthz" >/dev/null
curl -fsS "$LOCAL_DEBUG_WEB_URL" >/dev/null
fi
"$ROOT_DIR/scripts/local-debug-smoke.sh"
"$ROOT_DIR/scripts/dev-smoke.sh"
mkdir -p "$BROWSER_ACCEPTANCE_EVIDENCE_DIR"
node "$ROOT_DIR/platform_web/acceptance/browser-acceptance.mjs"