Files
whale-town-front-v2/scripts/prepare_site_release.sh
xiangwang fc6c3c1bd3 feat: expand multiplayer, chat, and release support
- add network NPC synchronization and dialogue interactions
- add world bulletin publishing and display
- improve authentication, session refresh, and appearance sync
- synchronize player direction and movement animations
- improve input focus and progressive Web loading
- add macOS/Windows builds and deployment configuration
- include required fonts, shaders, and runtime assets
2026-09-08 21:37:43 +08:00

47 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
SITE_DIR="$PROJECT_DIR/build/site"
WEB_DIR="$PROJECT_DIR/build/web"
HOMEPAGE_DIR="$(cd "$PROJECT_DIR/../homepage" && pwd)"
RELEASE_DIR="$PROJECT_DIR/build/desktop/release"
required_files=(
"$WEB_DIR/index.html"
"$WEB_DIR/index.js"
"$WEB_DIR/index.wasm"
"$RELEASE_DIR/WhaleTown-macOS-1.0.0.zip"
"$RELEASE_DIR/WhaleTown-Windows-x86_64-1.0.0.zip"
)
for file in "${required_files[@]}"; do
if [[ ! -f "$file" ]]; then
echo "Missing required release artifact: $file" >&2
echo "Build the Web and desktop releases before preparing the site." >&2
exit 1
fi
done
rm -rf "$SITE_DIR"
mkdir -p "$SITE_DIR/play" "$SITE_DIR/downloads"
cp -R "$HOMEPAGE_DIR/." "$SITE_DIR/"
if [[ -d "$SITE_DIR/.git" ]]; then
find "$SITE_DIR/.git" -depth -delete
fi
find "$SITE_DIR" -name '*.import' -delete
find "$SITE_DIR" -name '.DS_Store' -delete
cp -R "$WEB_DIR/." "$SITE_DIR/play/"
find "$SITE_DIR/play" -name '*.import' -delete
find "$SITE_DIR/play" -name '.DS_Store' -delete
cp "$RELEASE_DIR/WhaleTown-macOS-1.0.0.zip" "$SITE_DIR/downloads/"
cp "$RELEASE_DIR/WhaleTown-Windows-x86_64-1.0.0.zip" "$SITE_DIR/downloads/"
cp "$RELEASE_DIR/SHA256SUMS.txt" "$SITE_DIR/downloads/"
echo "Site release prepared in: $SITE_DIR"
echo " / Landing page"
echo " /play/ Web client"
echo " /downloads Desktop client ZIP files"