build.sh ends with the deploy bundle

./build.sh built the engine into site/ but left dist/, what deploy/nginx
ships, as it was; deploying after a build sent the previous bundle. Its last
step is now scripts/bundle-dist.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xda8d7rfJjkFSmKVQtcBGh
This commit is contained in:
Konstantin Pereiaslov 2026-11-15 20:13:22 -06:00
parent ce67c28f0f
commit fc10ef24a6
3 changed files with 10 additions and 4 deletions

View file

@ -66,7 +66,7 @@ git submodule update --init qemu # build.sh does this too; the qemu
# tree is ~1 GB with history
./build.sh # ~30-60 min first run: emsdk 4.0.10 + glib/pixman/zlib/libffi
# built for wasm64, then qemu → site/dist/
# qemu-system-arm.wasm
# qemu-system-arm.wasm, then the deploy bundle → dist/
./serve.mjs # http://127.0.0.1:8080 (COOP/COEP headers for pthreads)
# phone/LAN: auto-redirected to https://<lan-ip>:6808
# (self-signed — accept the browser warning once; browsers

View file

@ -1,6 +1,6 @@
#!/bin/bash
# One-shot build: emsdk + wasm deps + patched qemu-system-arm + web dist.
# Individual steps are cached; see scripts/*.sh.
# One-shot build: emsdk + wasm deps + patched qemu-system-arm into site/,
# then the deploy bundle in dist/. Individual steps are cached; see scripts/*.sh.
set -euo pipefail
WEB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@ -10,5 +10,8 @@ bash "$WEB_DIR/scripts/build-deps.sh"
echo "== [2/3] qemu (wasm64, arm-softmmu, TCG backend -> site/dist) =="
bash "$WEB_DIR/scripts/build-qemu.sh"
echo "== [3/3] done =="
echo "== [3/3] deploy bundle (site/ -> dist/) =="
bash "$WEB_DIR/scripts/bundle-dist.sh"
echo "serve with: node serve.mjs -> http://127.0.0.1:8080 (LAN/phone: https://<lan-ip>:6808)"
echo "deploy: dist/ (deploy/nginx/README.md)"

View file

@ -15,6 +15,9 @@ The moving parts:
scripts/bundle-dist.sh # → dist/ (see -- usage header for flags)
```
`./build.sh` runs it as its last step; after `scripts/ninja-fast.sh` or
another partial rebuild, run it yourself before deploying `dist/`.
Ships exactly what the page loads. The list is `page` and `images` at
the top of `scripts/bundle-dist.sh`, which refuses to bundle while a
tracked file under `site/` (outside `site/dist*`) is missing from it: