From 7dc4842d0d663b8381dc88ae414dd9c869b2bd1c Mon Sep 17 00:00:00 2001 From: John Coffey Date: Wed, 28 Oct 2026 12:09:42 -0700 Subject: [PATCH] discourse-release: call a pre-release a release candidate A pre-release (the suite's v27.1-rc.N tags) was announced as "released" and "is out". It is now titled " release candidate", its first line says it is a pre-release for testing that leaves latest and a plain install where they are, and the Discord line says "release candidate". A final release is announced exactly as before. Claude-Session: https://claude.ai/code/session_01Y2F7CWRXorttf5sjSbxwpj --- discourse-release/announce.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/discourse-release/announce.sh b/discourse-release/announce.sh index 701022f..fd46007 100755 --- a/discourse-release/announce.sh +++ b/discourse-release/announce.sh @@ -35,14 +35,19 @@ payload=$(jq -n --arg repo "$REPO" --argjson category "$category_id" --arg ext " --slurpfile ev "$EVENT_PATH" ' ($ev[0].release) as $r | ($repo | split("/") | last) as $name + # A pre-release is a release candidate: said in the title and the first + # line, so nobody takes it for what a plain install or `latest` gets. + | ($r.prerelease // false) as $rc | { # repo + tag, not the release name: names vary by project (some repeat # the tag, some carry a product name in capitals), tags do not. - title: "\($name) \($r.tag_name) released", + title: (if $rc then "\($name) \($r.tag_name) release candidate" else "\($name) \($r.tag_name) released" end), category: $category, external_id: $ext, raw: ( - "**\($name) \($r.tag_name)** is out.\n\n" + (if $rc + then "**\($name) \($r.tag_name)** is a release candidate: a pre-release for testing, not yet the release. `latest` and a plain install stay where they are.\n\n" + else "**\($name) \($r.tag_name)** is out.\n\n" end) + (if ($r.body // "") == "" then "" else "\($r.body)\n\n" end) + "---\n[Release on Gitea](\($r.html_url))" ) @@ -71,7 +76,7 @@ esac if [ -n "${DISCORD_WEBHOOK:-}" ]; then jq -n --arg u "$url" --slurpfile ev "$EVENT_PATH" --arg repo "$REPO" ' ($ev[0].release) as $r - | {content: ("**\($repo | split("/") | last) \($r.tag_name)** released\n\($u)")[0:1900]}' | + | {content: ("**\($repo | split("/") | last) \($r.tag_name)** " + (if ($r.prerelease // false) then "release candidate" else "released" end) + "\n\($u)")[0:1900]}' | curl -fsS -X POST "$DISCORD_WEBHOOK" -H "Content-Type: application/json" --data-binary @- >/dev/null \ && echo "posted to Discord" \ || echo "::warning::Discord webhook failed; the forum post stands" -- 2.54.0