summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-02 14:47:30 +0200
committeruser <user@clank>2026-09-02 14:47:30 +0200
commit3578eefea5b53bce2c1dbbc7f104f3cf85c8aa5b (patch)
treecccc5aaf79eb145496fb2c388654e3cf9fb571ff /contrib
parentshaders: remove the .so plugin loader (diff)
downloadslosh-3578eefea5b53bce2c1dbbc7f104f3cf85c8aa5b.tar.gz
slosh-3578eefea5b53bce2c1dbbc7f104f3cf85c8aa5b.tar.xz
slosh-3578eefea5b53bce2c1dbbc7f104f3cf85c8aa5b.zip
webdemo: version from contrib/version, published by ship
The demo's Makefile said VERSION := 0.1.0 by hand, so the in-browser slosh announced a release two tags old no matter what was built into it. It now derives from contrib/version like every other artifact, suffixed +webdemo so the guest build names itself. And ship gains a website step: the site (demo included) is rebuilt from the tag checkout and published as part of a release, so the demo cannot fall behind again.
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/ship25
1 files changed, 23 insertions, 2 deletions
diff --git a/contrib/ship b/contrib/ship
index e9274cd..9069481 100755
--- a/contrib/ship
+++ b/contrib/ship
@@ -17,7 +17,9 @@
# 5. gh release the five artifacts + SHA256SUMS on GitHub
# 6. brew-release pin the formula, push the tap
# 7. arch bump the PKGBUILD, rebuild + sign + rsync the repo
-# 8. paperwork commit the formula + PKGBUILD, push
+# 8. website rebuild + publish slosh.foo, demo included, so the
+# in-browser slosh is the released one
+# 9. paperwork commit the formula + PKGBUILD, push
#
# Every step is skipped when its result already exists, so a run that died at
# notarization resumes where it stopped instead of rebuilding artifacts whose
@@ -178,7 +180,26 @@ else
say "published to $ARCH_DEST for: $arches"
fi
-# ── 8. the paperwork ────────────────────────────────────────────────────────
+# ── 8. the website, so the in-browser demo runs what was just released ─────
+# The demo's slosh is cross-compiled from the tree the site is built in, and
+# its version comes from contrib/version -- built from the tag checkout, the
+# demo says exactly what the release says (v0.1.2 shipped while the demo
+# still announced 0.1.0, which is the drift this step removes). Old tags
+# predate web/publish; for those the site is built from master instead,
+# which is newer than the tag, not older.
+step "website + demo"
+if git show "$tag:web/publish" >/dev/null 2>&1; then
+ git checkout -q "$tag"
+ trap 'git checkout -q master' EXIT INT TERM
+ web/publish
+ git checkout -q master
+ trap - EXIT INT TERM
+else
+ say "$tag has no web/publish -- building the site from master"
+ web/publish
+fi
+
+# ── 9. the paperwork ────────────────────────────────────────────────────────
# The formula and the PKGBUILD pin the tag's tarball, so they can only change
# *after* the tag exists -- they land on master behind it.
step "paperwork"