fix: restore full Godot auth in progressive web build
This commit is contained in:
@@ -13,9 +13,17 @@ fi
|
||||
|
||||
mkdir -p "$WEB_DIR" "$PACK_DIR"
|
||||
find "$PACK_DIR" -maxdepth 1 -type f \( -name '*.pck' -o -name 'manifest.json' \) -delete
|
||||
find "$WEB_DIR" -maxdepth 1 -type f -name 'index-*.pck' -delete
|
||||
|
||||
"$GODOT_BIN" --headless --path "$PROJECT_DIR" --export-release "Web" "$WEB_DIR/index.html"
|
||||
|
||||
core_pack_path="$WEB_DIR/index.pck"
|
||||
core_hash=$(shasum -a 256 "$core_pack_path" | awk '{print substr($1, 1, 12)}')
|
||||
core_pack_name="index-$core_hash.pck"
|
||||
core_pack_size=$(stat -f '%z' "$core_pack_path")
|
||||
mv "$core_pack_path" "$WEB_DIR/$core_pack_name"
|
||||
perl -0pi -e "s/__WHALETOWN_CORE_PACK__/$core_pack_name/g; s/__WHALETOWN_CORE_PACK_SIZE__/$core_pack_size/g" "$WEB_DIR/index.html"
|
||||
|
||||
build_pack() {
|
||||
pack_key=$1
|
||||
preset=$2
|
||||
@@ -46,4 +54,4 @@ jq -n \
|
||||
cp "$PROJECT_DIR/web/auth-background.jpg" "$WEB_DIR/auth-background.jpg"
|
||||
|
||||
echo "Progressive web build created in $WEB_DIR"
|
||||
du -h "$WEB_DIR/index.pck" "$WEB_DIR/index.wasm" "$WEB_DIR/auth-background.jpg" "$PACK_DIR"/*.pck
|
||||
du -h "$WEB_DIR/$core_pack_name" "$WEB_DIR/index.wasm" "$WEB_DIR/auth-background.jpg" "$PACK_DIR"/*.pck
|
||||
|
||||
Reference in New Issue
Block a user