chore(release): default to alpha cascade; tidy stale CI references
- release-image.sh now defaults to alpha (was stable). Active dev no longer silently advances :stable; that tag only moves on a deliberate `sh release-image.sh <ver> stable`. Same cascade logic, reordered default. Updated AGENTS.md and zddc/README.md sections accordingly. - zddc/Containerfile: dropped the "see .woodpecker.yml" comment since that file no longer exists; pointed the docs to release-image.sh. - build.sh: dropped the "CI builds the runtime container directly" parenthetical; the cross-compiled host-binaries build is the only thing that step actually produces. Why alpha as the default: caught it during active development — :stable kept advancing every release because the script defaulted there. Solo workflow + alpha default = `:stable` is a deliberate gesture, not a side-effect. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5960fbca91
commit
40d9956e54
5 changed files with 49 additions and 33 deletions
18
AGENTS.md
18
AGENTS.md
|
|
@ -278,14 +278,20 @@ ZDDC_DATA_DIR=/path/to/your/archive podman-compose -f zddc/podman-compose.yaml u
|
||||||
Two coordinated steps — git tag for auditability, then local image build:
|
Two coordinated steps — git tag for auditability, then local image build:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git tag zddc-server-v1.0.0
|
git tag zddc-server-v0.0.4
|
||||||
git push origin zddc-server-v1.0.0
|
git push origin zddc-server-v0.0.4
|
||||||
sh release-image.sh 1.0.0 # → :1.0.0 :stable :beta :alpha
|
sh release-image.sh 0.0.4 # default: alpha → :0.0.4 :alpha
|
||||||
|
sh release-image.sh 0.0.4 beta # beta cascade → :0.0.4 :beta :alpha
|
||||||
|
sh release-image.sh 0.0.4 stable # stable cascade → :0.0.4 :stable :beta :alpha
|
||||||
```
|
```
|
||||||
|
|
||||||
The cascade matches the channel rules elsewhere in the repo: stable bumps
|
**Default channel is `alpha`** so `:stable` never advances by accident
|
||||||
all four tags; `beta` bumps `:1.0.0-beta.N :beta :alpha`; `alpha` bumps
|
during active development. Pass `beta` to soak; pass `stable` only when
|
||||||
`:1.0.0-alpha.N :alpha`. See `release-image.sh` for the full mapping.
|
deliberately promoting. Cascades:
|
||||||
|
|
||||||
|
- `alpha` → `:<version> :alpha`
|
||||||
|
- `beta` → `:<version> :beta :alpha`
|
||||||
|
- `stable` → `:<version> :stable :beta :alpha`
|
||||||
|
|
||||||
Prerequisite: `podman login codeberg.org` (one-time, with a Codeberg
|
Prerequisite: `podman login codeberg.org` (one-time, with a Codeberg
|
||||||
personal token scoped `package:write`).
|
personal token scoped `package:write`).
|
||||||
|
|
|
||||||
12
build.sh
12
build.sh
|
|
@ -27,17 +27,19 @@ cp "$SCRIPT_DIR/archive/dist/archive.html" "$SCRIPT_DIR/zddc/dist/web/archive.ht
|
||||||
echo "Wrote zddc/dist/web/index.html"
|
echo "Wrote zddc/dist/web/index.html"
|
||||||
echo "Wrote zddc/dist/web/archive.html"
|
echo "Wrote zddc/dist/web/archive.html"
|
||||||
|
|
||||||
# Cross-compiled zddc-server binaries are built via podman if available
|
# Cross-compiled zddc-server binaries — only relevant if you're shipping
|
||||||
# (no-op otherwise — CI builds the runtime container directly via the
|
# standalone Linux/macOS/Windows binaries to users. Skipped silently when
|
||||||
# Containerfile's builder stage and doesn't need host-side binaries).
|
# podman isn't on PATH; the runtime container release path
|
||||||
|
# (release-image.sh) does its own internal build via Containerfile's
|
||||||
|
# multi-stage flow and doesn't need these host-side binaries.
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Building zddc-server binaries ==="
|
echo "=== Building zddc-server binaries ==="
|
||||||
if command -v podman >/dev/null 2>&1; then
|
if command -v podman >/dev/null 2>&1; then
|
||||||
podman build --target binaries -o "$SCRIPT_DIR/zddc/dist/" "$SCRIPT_DIR/zddc/" 2>&1 | grep -v "^-->"
|
podman build --target binaries -o "$SCRIPT_DIR/zddc/dist/" "$SCRIPT_DIR/zddc/" 2>&1 | grep -v "^-->"
|
||||||
else
|
else
|
||||||
echo "podman not found — skipping cross-compiled binary build."
|
echo "podman not found — skipping cross-compiled binary build."
|
||||||
echo " (CI builds the container image directly; this step only matters"
|
echo " (Standalone-binary distribution only; the runtime container"
|
||||||
echo " for releasing the standalone Linux/macOS/Windows binaries.)"
|
echo " release path builds its own copy via Containerfile.)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ─── Bootstrap zips ──────────────────────────────────────────────────────────
|
# ─── Bootstrap zips ──────────────────────────────────────────────────────────
|
||||||
|
|
|
||||||
|
|
@ -3,19 +3,24 @@
|
||||||
# to codeberg.org/varasys/zddc-server with cascading channel tags.
|
# to codeberg.org/varasys/zddc-server with cascading channel tags.
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# sh release-image.sh <version> [stable|beta|alpha]
|
# sh release-image.sh <version> [alpha|beta|stable]
|
||||||
#
|
#
|
||||||
# stable → :<version> :stable :beta :alpha (default)
|
# alpha → :<version> :alpha (default — for active dev)
|
||||||
# beta → :<version> :beta :alpha
|
# beta → :<version> :beta :alpha
|
||||||
# alpha → :<version> :alpha
|
# stable → :<version> :stable :beta :alpha
|
||||||
#
|
#
|
||||||
# Examples:
|
# Examples:
|
||||||
# sh release-image.sh 0.0.3 # → :0.0.3 :stable :beta :alpha
|
# sh release-image.sh 0.0.4 # → :0.0.4 :alpha (default)
|
||||||
# sh release-image.sh 0.0.3-beta.1 beta # → :0.0.3-beta.1 :beta :alpha
|
# sh release-image.sh 0.0.4 beta # → :0.0.4 :beta :alpha
|
||||||
# sh release-image.sh 0.0.3-alpha.2 alpha # → :0.0.3-alpha.2 :alpha
|
# sh release-image.sh 0.0.4 stable # → :0.0.4 :stable :beta :alpha
|
||||||
#
|
#
|
||||||
# Convention: cut a git tag first (`git tag zddc-server-v0.0.3 && git push
|
# Why alpha is the default: `:stable` should only advance on a deliberate
|
||||||
# origin zddc-server-v0.0.3`) so version history is auditable, then run this
|
# promotion, not as a side-effect of every dev release. With alpha as
|
||||||
|
# default, `sh release-image.sh <version>` always lands on the alpha
|
||||||
|
# channel; the `:stable` tag stays put until you explicitly pass `stable`.
|
||||||
|
#
|
||||||
|
# Convention: cut a git tag first (`git tag zddc-server-v0.0.4 && git push
|
||||||
|
# origin zddc-server-v0.0.4`) so version history is auditable, then run this
|
||||||
# to publish the image. The two are coordinated by hand, deliberately —
|
# to publish the image. The two are coordinated by hand, deliberately —
|
||||||
# `.woodpecker.yml` is gone; this script is the canonical path.
|
# `.woodpecker.yml` is gone; this script is the canonical path.
|
||||||
#
|
#
|
||||||
|
|
@ -34,20 +39,21 @@
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: $0 <version> [stable|beta|alpha]" >&2
|
echo "usage: $0 <version> [alpha|beta|stable]" >&2
|
||||||
echo " version: e.g. 0.0.3, 0.0.3-beta.1, 0.0.3-alpha.2" >&2
|
echo " channel default: alpha (active dev)" >&2
|
||||||
|
echo " version: e.g. 0.0.4, 0.0.4-beta.1, 0.0.4-alpha.2" >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
[ $# -ge 1 ] || usage
|
[ $# -ge 1 ] || usage
|
||||||
VERSION="$1"
|
VERSION="$1"
|
||||||
CHANNEL="${2:-stable}"
|
CHANNEL="${2:-alpha}"
|
||||||
|
|
||||||
case "$CHANNEL" in
|
case "$CHANNEL" in
|
||||||
stable) TAGS="$VERSION stable beta alpha" ;;
|
|
||||||
beta) TAGS="$VERSION beta alpha" ;;
|
|
||||||
alpha) TAGS="$VERSION alpha" ;;
|
alpha) TAGS="$VERSION alpha" ;;
|
||||||
*) echo "error: unknown channel: $CHANNEL (expected stable|beta|alpha)" >&2; exit 1 ;;
|
beta) TAGS="$VERSION beta alpha" ;;
|
||||||
|
stable) TAGS="$VERSION stable beta alpha" ;;
|
||||||
|
*) echo "error: unknown channel: $CHANNEL (expected alpha|beta|stable)" >&2; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
REPO="codeberg.org/varasys/zddc-server"
|
REPO="codeberg.org/varasys/zddc-server"
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,9 @@
|
||||||
#
|
#
|
||||||
# Build context expectations (when targeting `server`):
|
# Build context expectations (when targeting `server`):
|
||||||
# dist/web/index.html and dist/web/archive.html must exist —
|
# dist/web/index.html and dist/web/archive.html must exist —
|
||||||
# produced by `sh build.sh` from the repo root. CI assembles these
|
# produced by `sh build.sh` from the repo root. The release flow
|
||||||
# before invoking podman. See .woodpecker.yml.
|
# (`release-image.sh` at the repo root) runs build.sh first and
|
||||||
|
# then invokes `podman build --target server`.
|
||||||
#
|
#
|
||||||
|
|
||||||
# ─── Stage 1: build ──────────────────────────────────────────────────────────
|
# ─── Stage 1: build ──────────────────────────────────────────────────────────
|
||||||
|
|
|
||||||
|
|
@ -461,13 +461,14 @@ steps — git tag for auditability, then local image build and push:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# 1. Tag the source.
|
# 1. Tag the source.
|
||||||
git tag zddc-server-v1.0.0
|
git tag zddc-server-v0.0.4
|
||||||
git push origin zddc-server-v1.0.0
|
git push origin zddc-server-v0.0.4
|
||||||
|
|
||||||
# 2. Build and push the runtime image with cascading channel tags.
|
# 2. Build and push the runtime image. Default cascade is alpha-only,
|
||||||
sh release-image.sh 1.0.0 # → :1.0.0 :stable :beta :alpha
|
# so `:stable` doesn't advance unless you deliberately promote.
|
||||||
sh release-image.sh 1.0.0-beta.1 beta # beta-channel release
|
sh release-image.sh 0.0.4 # → :0.0.4 :alpha (default)
|
||||||
sh release-image.sh 1.0.0-alpha.2 alpha # alpha-channel release
|
sh release-image.sh 0.0.4 beta # → :0.0.4 :beta :alpha
|
||||||
|
sh release-image.sh 0.0.4 stable # → :0.0.4 :stable :beta :alpha
|
||||||
```
|
```
|
||||||
|
|
||||||
Prerequisite: `podman login codeberg.org` (or `docker login`) once,
|
Prerequisite: `podman login codeberg.org` (or `docker login`) once,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue