38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Static GUI smoke check for Wails/Svelte builds.
|
|
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
GUI_BUILD_OUT="${GUI_BUILD_OUT:-/tmp/verstak-gui-check}"
|
|
|
|
echo "=== Checking GUI locale/source hygiene ==="
|
|
"$ROOT/scripts/check-i18n.sh"
|
|
|
|
echo ""
|
|
echo "=== Building frontend production bundle ==="
|
|
(cd "$ROOT/frontend" && npm run build)
|
|
|
|
echo ""
|
|
echo "=== Checking embedded Wails assets ==="
|
|
if [ ! -d "$ROOT/cmd/verstak-gui/frontend-dist" ]; then
|
|
echo "FAIL: cmd/verstak-gui/frontend-dist is missing"
|
|
echo "Run ./scripts/build.sh gui and commit the embedded assets."
|
|
exit 1
|
|
fi
|
|
|
|
if ! diff -qr "$ROOT/frontend/dist" "$ROOT/cmd/verstak-gui/frontend-dist"; then
|
|
echo ""
|
|
echo "FAIL: embedded Wails assets are stale."
|
|
echo "Run ./scripts/build.sh gui and commit cmd/verstak-gui/frontend-dist."
|
|
exit 1
|
|
fi
|
|
|
|
echo "OK: embedded Wails assets match frontend/dist"
|
|
|
|
echo ""
|
|
echo "=== Compiling GUI binary ==="
|
|
go build -tags "webkit2_41 desktop production" -ldflags="-s -w" -o "$GUI_BUILD_OUT" "$ROOT/cmd/verstak-gui/"
|
|
|
|
echo "OK: GUI smoke check passed"
|