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:
Executable
+28
@@ -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"
|
||||
Reference in New Issue
Block a user