Files
ai-spel-frontend/scripts/check-frontend.sh
T
Ein Anderssono f4dcb0de1a
Build and publish frontend / publish (push) Successful in 48s
Remove world description from character start
2026-10-14 14:06:50 +02:00

21 lines
759 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
test -s index.html
grep -q '<html lang="sv">' index.html
grep -q '<h1>En värld du formar</h1>' index.html
grep -q 'id="frontend-version">__FRONTEND_VERSION__' index.html
grep -q "request('/version')" index.html
grep -q 'id="api-version"' index.html
grep -Fq "credentials: 'same-origin'" index.html
grep -q 'Köp på platsen' index.html
grep -q "request('/api/purchases'" index.html
grep -q "request('/api/world/start'" index.html
if grep -Eq 'world/draft|npc_name|Person du kan möta|Beskriv vad du vill börja med' index.html; then
echo 'The start flow must not ask for a world description or preview a person.' >&2
exit 1
fi
grep -q 'location = /healthz' nginx/default.conf
echo 'Frontend source checks passed.'