Fix WESP UI after git clone: serve from public/wesp and materialize static.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
влад
2026-07-16 11:43:25 +03:00
co-authored by Cursor
parent 2c294424ef
commit 5dfa06ddbe
8 changed files with 49 additions and 36 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# Build apps/web/public/static from git-tracked public/wesp.
# Optionally refresh public/wesp from an external WESP hub checkout first.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
WESP_EXTERNAL="${WESP_STATIC:-$ROOT/../wesp/static}"
SRC="$ROOT/apps/web/public/wesp"
DEST="$ROOT/apps/web/public/static"
if [ ! -d "$SRC" ]; then
echo "WESP UI source not found: $SRC" >&2
exit 1
fi
if [ -d "$WESP_EXTERNAL" ]; then
rsync -a --delete \
--exclude '.DS_Store' \
"$WESP_EXTERNAL/" "$SRC/"
echo "Refreshed $SRC from $WESP_EXTERNAL"
fi
mkdir -p "$DEST"
rsync -a --delete \
--exclude '.DS_Store' \
"$SRC/" "$DEST/"
echo "Materialized WESP static: $SRC -> $DEST"