aboutsummaryrefslogtreecommitdiffstats
path: root/web/build-site
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-30 12:49:24 +0200
committeruser <user@clank>2026-08-30 12:49:24 +0200
commita3c5c69d089efd3d778e8b4ef859a6432cd3d07f (patch)
treeb048c2c08709d671fe92907c952df80359893394 /web/build-site
parentgraphics: a frame the client never got must be said again (diff)
downloadslosh-a3c5c69d089efd3d778e8b4ef859a6432cd3d07f.tar.gz
slosh-a3c5c69d089efd3d778e8b4ef859a6432cd3d07f.tar.xz
slosh-a3c5c69d089efd3d778e8b4ef859a6432cd3d07f.zip
web: sloshcast
Diffstat (limited to 'web/build-site')
-rwxr-xr-xweb/build-site27
1 files changed, 22 insertions, 5 deletions
diff --git a/web/build-site b/web/build-site
index 7dd78f3..c3d96c6 100755
--- a/web/build-site
+++ b/web/build-site
@@ -17,26 +17,42 @@ set -eu
here="$(cd "$(dirname "$0")" && pwd)"
root="$(dirname "$here")"
-out="$root/build/www"
+www="$root/build/www"
+# Assemble into a staging directory and swap at the end: a build that fails
+# halfway (set -eu) must not have already deleted the site that worked.
+out="$root/build/.www-staging"
rm -rf "$out"
mkdir -p "$out"
+publish() {
+ rm -rf "$www"
+ mv "$out" "$www"
+}
+
# For now slosh.foo is a coming-soon page; the full site is assembled only
# when asked (FULL=1) while it is being finished.
if [ "${FULL:-0}" != 1 ]; then
cp "$here/coming-soon.html" "$out/index.html"
- echo "build-site: $out (coming soon -- FULL=1 for the real site)"
+ publish
+ echo "build-site: $www (coming soon -- FULL=1 for the real site)"
exit 0
fi
-# The front page.
+# The front page. Its recordings are below; there is no video.
cp "$here/index.html" "$here/site.css" "$here/install.sh" "$out/"
-cp "$here/slosh-preview.mp4" "$out/"
# The docs, rendered by the same generator `make docs` uses.
python3 "$root/contrib/gen-docs" "$out/docs"
+# The recordings: scripted feature playbacks (see recordings/PLAN.md),
+# re-rendered from their driver scripts so they can never be stale.
+make -C "$here/recordings"
+mkdir -p "$out/recordings"
+cp "$here/recordings/build/"*.json \
+ "$here/recordings/player.js" "$here/recordings/player.css" \
+ "$out/recordings/"
+
# The demo, assembled by its own Makefile, on its own page.
if [ "${NO_DEMO:-0}" = 1 ]; then
echo "build-site: skipping demo (NO_DEMO=1)"
@@ -46,5 +62,6 @@ else
cp -R "$here/demo/build/site/." "$out/demo/"
fi
-echo "build-site: $out"
+publish
+echo "build-site: $www"
echo "build-site: serve with: web/demo/serve --dir build/www"