Publish small fixes as release candidates of the next version

Every fix so far became its own patch release, and the natural alternative —
v0.10.3-a — sorts before v0.10.3 by SemVer's rules: a hyphen marks a
pre-release, so every tool that orders versions would take the fix for the
older one. A release candidate of the next version, v0.10.4-rc.1, sorts
after v0.10.3 and before v0.10.4, which is what it is.

CI already builds any v* tag. Its release notes now come from a
"## Unreleased" section in CHANGELOG.md, where changes gather until the
version they belong to is released, and the release is marked as a
pre-release. Onboarding, in Go and in the shell script, counts a candidate
as a release and downloads it rather than copying the operator's binary.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-09-30 01:00:11 +02:00
1 parent ad6d2d348d
commit a025ad4f43
5 files changed
+60 -9

No files matched your search

+22
View File
@@ -20,6 +20,28 @@ is only released once its **exit criterion** is met, not when its code lands.
Until v1.0.0 the minor version is the breaking one: configuration formats and Go
APIs change between minors without a deprecation period.
## Unreleased
Changes since v0.10.3, published as release candidates (v0.10.4-rc.N) until
there are enough for v0.10.4.
### Restarting replicas
`llmgw ctl restart REPLICA... | --model M | --all` replaces replicas with new
ones. Each replacement is started beside the replica it replaces, which keeps
serving until the new one is ready; replicas of one model go one at a time.
Where no second copy fits anywhere, the old replica is stopped after the drain
grace period and the new one starts in its place. This is how running engines
pick up the keys introduced in v0.10.3, an edited profile, or a new engine
version.
### Releases
Small fixes are published as release candidates of the next version —
v0.10.4-rc.1, rc.2 — which sort after v0.10.3 and before v0.10.4. Their release
notes come from this section, and they are marked as pre-releases. Onboarding
treats a release candidate as a release and downloads it.
## v0.10.3 — 2026-09-30
Security fixes from a review of v0.10.2. Three of them were confirmed on the
+1 -1
View File
@@ -143,7 +143,7 @@ $SSH "set -e
# that is not a release (a developer's, with commits past the tag) has no such
# file, and is copied as before.
TAG="$("$BINARY" --version 2>/dev/null | awk '{print $NF}')"
if printf '%s' "$TAG" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
if printf '%s' "$TAG" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$'; then
say "installing llmgw $TAG from the release"
$SSH "set -e
arch=\$(dpkg --print-architecture)
+4 -1
View File
@@ -332,7 +332,10 @@ func certNames(path string) ([]string, error) {
// --- binary ---
var releaseTag = regexp.MustCompile(`^v\d+\.\d+\.\d+$`)
// releaseTag is a version CI published: v0.10.4, or a release candidate of
// it, v0.10.4-rc.2. Anything else — a build with commits past its tag — has no
// release to download.
var releaseTag = regexp.MustCompile(`^v\d+\.\d+\.\d+(-rc\.\d+)?$`)
func (r *Runner) binary(ctx context.Context, res *Result) error {
v := r.Opts.Version
+14
View File
@@ -0,0 +1,14 @@
package onboard
import "testing"
func TestAReleaseCandidateIsARelease(t *testing.T) {
for v, want := range map[string]bool{
"v0.10.4": true, "v0.10.4-rc.1": true, "v0.10.4-rc.12": true,
"v0.10.3-5-gad6d2d3": false, "v0.10.4-rc": false, "v0.10.3-a": false, "dev": false,
} {
if got := releaseTag.MatchString(v); got != want {
t.Errorf("%s: %v", v, got)
}
}
}
+19 -7
View File
@@ -10,6 +10,11 @@ it, it does not replace it.
Idempotent: a release whose body already matches is left alone, a version with
no release is skipped, and nothing is created or deleted.
A release candidate — v0.10.4-rc.2 — takes the "## Unreleased" section, which
is where changes gather until the version they belong to is released, and is
marked as a pre-release. The final v0.10.4 takes its own section once
"Unreleased" has been renamed to it.
Usage:
GITEA_TOKEN=<token> scripts/gitea/release_notes.py [--tag v0.8.1] [--dry-run]
@@ -32,7 +37,8 @@ DEFAULT_REPO = "ilker/llmgw"
# "## v0.8.1 — 2026-09-28". The dash is whatever was typed; the version is what
# matters.
HEADING = re.compile(r"^## (v\d+\.\d+\.\d+)\b.*$", re.M)
HEADING = re.compile(r"^## (v\d+\.\d+\.\d+|Unreleased)\b.*$", re.M)
CANDIDATE = re.compile(r"^v\d+\.\d+\.\d+-rc\.\d+$")
def sections(changelog):
@@ -77,11 +83,16 @@ def main():
with open(args.changelog, encoding="utf-8") as f:
notes = sections(f.read())
if args.tag:
if args.tag not in notes:
section = "Unreleased" if CANDIDATE.match(args.tag) else args.tag
if section not in notes:
# A tag with no section is a release somebody forgot to describe.
# Failing says so where it is seen; an empty page says nothing.
sys.exit(f"{args.changelog} has no section for {args.tag}")
notes = {args.tag: notes[args.tag]}
sys.exit(f"{args.changelog} has no section for {args.tag} (looked for {section!r})")
notes = {args.tag: notes[section]}
else:
# Syncing everything: "Unreleased" belongs to whichever candidate is
# newest, which only a tag says.
notes.pop("Unreleased", None)
base = f"{args.instance.rstrip('/')}/api/v1/repos/{args.repo}/releases"
for tag, body in notes.items():
@@ -92,11 +103,12 @@ def main():
if rel is None:
print(f"skip {tag} (no release)")
continue
if (rel.get("body") or "").strip() == body.strip():
pre = bool(CANDIDATE.match(tag))
if (rel.get("body") or "").strip() == body.strip() and bool(rel.get("prerelease")) == pre:
print(f"same {tag}")
continue
request("PATCH", f"{base}/{rel['id']}", token, {"body": body})
print(f"set {tag}")
request("PATCH", f"{base}/{rel['id']}", token, {"body": body, "prerelease": pre})
print(f"set {tag}" + (" (pre-release)" if pre else ""))
if __name__ == "__main__":