Files
beardrive/internal/webapp/frontend/check-dist.sh
T
Snow LeeandClaude Fable 5 e701555257 feat(webapp): [phase 0] React+TS frontend scaffold, build pipeline, e2e harness
- Vite+React+TypeScript workspace at internal/webapp/frontend; vite build
  emits committed assets into internal/webapp/static (the go:embed target),
  so plain 'go build' still needs no Node
- style.css and the SVG sprite ported verbatim; boot layer (api/config,
  401->login redirect) ported so the auth flow works end to end
- frontend(): content-hashed assets/* now served immutable; index.html
  stays no-cache (TestFrontendSPAFallback covers both)
- committed e2e harness (BDRIVE_E2E_SERVE=1, deterministic seeded hub on
  :8993) wired as Playwright webServer; 4 shell specs green
- check-dist.sh guards against stale committed build output

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P5cxPQdSGJnjXCYY9GeWXt
2026-07-13 09:57:14 -07:00

15 lines
475 B
Bash
Executable File

#!/bin/sh
# Verify the committed build output at ../static matches the frontend
# source. Run before tagging a release (goreleaser requires a clean tree,
# so a stale dist would otherwise slip through silently).
set -e
cd "$(dirname "$0")"
npm ci
npm run build
if [ -n "$(git status --porcelain -- ../static)" ]; then
echo "internal/webapp/static is stale: rebuild and commit it" >&2
git status --short -- ../static >&2
exit 1
fi
echo "internal/webapp/static is fresh"