diff --git a/AGENTS.md b/AGENTS.md index 7865625..244545c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -321,6 +321,18 @@ Pre-release semver ordering (`0.0.8-alpha.1 < 0.0.8-alpha.2 < tag sorting, `git tag --sort=-v:refname`, `sort -V`, npm, cargo — so consumers can pin or compare versions without surprises. +**Binary publishing** — `release-image.sh` also mirrors the +cross-compiled binaries from `zddc/dist/zddc-server--` into +`website/releases/zddc-server---` for every channel +in the cascade. These are mutable channel pointers (no immutable +per-version files — those live in the container registry to keep the +git tree from growing 40MB per release). Plain `sh build.sh` does +NOT mirror the binaries; only `release-image.sh` does, deliberately, +so the website's binaries always match a published image. + +The mirrored files at `https://zddc.varasys.io/releases/zddc-server-…` +are what the dev shell's `zddc-use` helper fetches by default. + Prerequisite: `podman login codeberg.org` (one-time, with a Codeberg personal token scoped `package:write`). diff --git a/release-image.sh b/release-image.sh index 92994d5..fb37132 100755 --- a/release-image.sh +++ b/release-image.sh @@ -133,6 +133,39 @@ echo # --- Refresh HTML dist (Containerfile COPYs from dist/web) ------------------ sh "$SCRIPT_DIR/build.sh" +# --- Mirror cross-compiled binaries to website/releases/ ------------------- +# Channel pointers, mutable: cascade rules mirror this image's binaries to +# every channel in the cascade so a `zddc-use :stable` curl pulls bytes that +# match the just-published stable image. Per-version pinning is provided by +# the container registry's :vX.Y.Z-alpha.N tag, not by an immutable file +# here — keeps the repo from growing 40MB per release. Plain `sh build.sh` +# does NOT mirror binaries, deliberately: it would dirty 40MB of files on +# every dev iteration. Use release-image.sh as the publish trigger. +publish_binary() { + _src="$1" # path under zddc/dist/, e.g. zddc-server-linux-amd64 + _basename=$(basename "$_src") + if [ ! -f "$SCRIPT_DIR/zddc/dist/$_src" ]; then + echo "warn: $_src not found in zddc/dist/; skipping mirror" >&2 + return 0 + fi + # The version-style tag (e.g. 0.0.8-alpha.1) is in $TAGS too — skip it; + # only iterate the channel-name tags. + for _tag in $TAGS; do + case "$_tag" in + alpha | beta | stable) + _dest="$SCRIPT_DIR/website/releases/${_basename%.exe}-${_tag}" + case "$_basename" in *.exe) _dest="${_dest}.exe" ;; esac + cp -f "$SCRIPT_DIR/zddc/dist/$_src" "$_dest" + echo "mirrored $_src → website/releases/$(basename "$_dest")" + ;; + esac + done +} +publish_binary zddc-server-linux-amd64 +publish_binary zddc-server-darwin-amd64 +publish_binary zddc-server-darwin-arm64 +publish_binary zddc-server-windows-amd64.exe + # --- Tag the commit (idempotent: skip if the tag already points here) ------- if git -C "$SCRIPT_DIR" rev-parse -q --verify "refs/tags/$GIT_TAG" >/dev/null; then _existing=$(git -C "$SCRIPT_DIR" rev-list -n 1 "$GIT_TAG") diff --git a/website/releases/archive_alpha.html b/website/releases/archive_alpha.html index ad4d9c4..f512401 100644 --- a/website/releases/archive_alpha.html +++ b/website/releases/archive_alpha.html @@ -2095,7 +2095,7 @@ td[data-field="trackingNumber"] {
ZDDC Archive - v0.0.3-alpha · 2026-04-29 22:41:21 · 9459139-dirty + v0.0.3-alpha · 2026-04-29 23:06:28 · 43c370a-dirty
diff --git a/website/releases/classifier_alpha.html b/website/releases/classifier_alpha.html index df549ad..6c5b5d7 100644 --- a/website/releases/classifier_alpha.html +++ b/website/releases/classifier_alpha.html @@ -1358,7 +1358,7 @@ body.help-open .app-header {
ZDDC Classifier - v0.0.3-alpha · 2026-04-29 22:41:21 · 9459139-dirty + v0.0.3-alpha · 2026-04-29 23:06:28 · 43c370a-dirty
diff --git a/website/releases/landing_alpha.html b/website/releases/landing_alpha.html index 3238cbc..4466fa0 100644 --- a/website/releases/landing_alpha.html +++ b/website/releases/landing_alpha.html @@ -884,7 +884,7 @@ body {
ZDDC Archive - v0.0.3-alpha · 2026-04-29 22:41:21 · 9459139-dirty + v0.0.3-alpha · 2026-04-29 23:06:28 · 43c370a-dirty
diff --git a/website/releases/mdedit_alpha.html b/website/releases/mdedit_alpha.html index d263159..fe08460 100644 --- a/website/releases/mdedit_alpha.html +++ b/website/releases/mdedit_alpha.html @@ -1650,7 +1650,7 @@ body.help-open .app-header {
ZDDC Markdown - v0.0.3-alpha · 2026-04-29 22:41:21 · 9459139-dirty + v0.0.3-alpha · 2026-04-29 23:06:28 · 43c370a-dirty
diff --git a/website/releases/transmittal_alpha.html b/website/releases/transmittal_alpha.html index c3993b7..2410afe 100644 --- a/website/releases/transmittal_alpha.html +++ b/website/releases/transmittal_alpha.html @@ -2192,7 +2192,7 @@ dialog.modal--narrow { JavaScript not available
ZDDC Transmittal - v0.0.3-alpha · 2026-04-29 22:41:21 · 9459139 + v0.0.3-alpha · 2026-04-29 23:06:28 · 43c370a-dirty
diff --git a/website/releases/zddc-server-darwin-amd64-alpha b/website/releases/zddc-server-darwin-amd64-alpha new file mode 100755 index 0000000..dfc0782 Binary files /dev/null and b/website/releases/zddc-server-darwin-amd64-alpha differ diff --git a/website/releases/zddc-server-darwin-arm64-alpha b/website/releases/zddc-server-darwin-arm64-alpha new file mode 100755 index 0000000..0607a94 Binary files /dev/null and b/website/releases/zddc-server-darwin-arm64-alpha differ diff --git a/website/releases/zddc-server-linux-amd64-alpha b/website/releases/zddc-server-linux-amd64-alpha new file mode 100755 index 0000000..1e7ab94 Binary files /dev/null and b/website/releases/zddc-server-linux-amd64-alpha differ diff --git a/website/releases/zddc-server-windows-amd64-alpha.exe b/website/releases/zddc-server-windows-amd64-alpha.exe new file mode 100755 index 0000000..a1b709e Binary files /dev/null and b/website/releases/zddc-server-windows-amd64-alpha.exe differ