Initial commit: AetherForge Linux (forge-mesh) v0.1.0-dev
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
This commit is contained in:
16
scripts/sync-webroot.sh
Executable file
16
scripts/sync-webroot.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copy Vite build output into cmd/server/webroot for go:embed.
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
DIST="$ROOT/web/dist"
|
||||
WEBROOT="$ROOT/cmd/server/webroot"
|
||||
|
||||
if [[ ! -f "$DIST/index.html" ]]; then
|
||||
echo "ERROR: $DIST/index.html missing — run: cd web && npm run build" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf "$WEBROOT"
|
||||
mkdir -p "$WEBROOT"
|
||||
cp -a "$DIST"/. "$WEBROOT/"
|
||||
echo "Synced web/dist -> cmd/server/webroot ($(find "$WEBROOT" -type f | wc -l) files)"
|
||||
Reference in New Issue
Block a user