From 3247b3e6c231f2a322375dc4e52e55b470691c39 Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Mon, 16 Nov 2026 16:52:29 +0100 Subject: [PATCH 1/2] feat: release patch versions from one stable-X.Y branch per minor Patch versions and patch builds release from a long-lived stable-X.Y branch instead of one stable-X.Y.Z branch per version. The previous tag is the highest version below the release, so a 9.3.10 after 9.4.0 compares against 9.3.9. Forward-ports keep main's version. Refs #14 Signed-off-by: Julius Knorr Assisted-by: ClaudeCode:claude-opus-5-5 --- .github/release/round.md | 6 ++-- .github/workflows/issue.yml | 3 +- .github/workflows/tag.yml | 2 +- README.md | 65 +++++++++++++++++++------------------ release.sh | 41 ++++++++++++----------- test.sh | 17 ++++++---- 6 files changed, 70 insertions(+), 64 deletions(-) diff --git a/.github/release/round.md b/.github/release/round.md index 19b523a..9669059 100644 --- a/.github/release/round.md +++ b/.github/release/round.md @@ -6,17 +6,17 @@ A patch build (`{{BASE}}-N`) counts as a final release. ### Prepare -- [ ] Second round onwards: fixes for this version are merged on `main` and backported to `stable-{{BASE}}` (`/backport to stable-{{BASE}}` on the merged PR) +- [ ] Second round onwards and patch versions: fixes for this version are merged on `main` and backported to `{{BRANCH}}` (`/backport to {{BRANCH}}` on the merged PR) - [ ] [Prepare release](https://github.com/Euro-Office/release/actions/workflows/prepare.yml) with `{{VERSION}}` - [ ] CI is green on the release PRs of [DocumentServer](https://github.com/Euro-Office/DocumentServer/pulls?q=head%3Arelease%2Fv{{VERSION}}) and [DesktopEditors](https://github.com/Euro-Office/DesktopEditors/pulls?q=head%3Arelease%2Fv{{VERSION}}) - [ ] QA the PR builds (linked in the PR comments): packages on the supported distributions, Docker image, desktop installers - [ ] Blockers are fixed or moved -- [ ] Approve and merge both release PRs (from the second round on they target `stable-{{BASE}}`) +- [ ] Approve and merge both release PRs (they target `{{BRANCH}}` once it exists) ### Tag - [ ] [Tag release](https://github.com/Euro-Office/release/actions/workflows/tag.yml) with `{{VERSION}}`, approve the `release` environment deployment -- [ ] Second round onwards, before the next round: merge the `forward-port/v{{VERSION}}` PRs on `main` of [DocumentServer](https://github.com/Euro-Office/DocumentServer/pulls?q=head%3Aforward-port%2Fv{{VERSION}}) and [DesktopEditors](https://github.com/Euro-Office/DesktopEditors/pulls?q=head%3Aforward-port%2Fv{{VERSION}}) +- [ ] Second round onwards and patch versions, before the next round: merge the `forward-port/v{{VERSION}}` PRs on `main` of [DocumentServer](https://github.com/Euro-Office/DocumentServer/pulls?q=head%3Aforward-port%2Fv{{VERSION}}) and [DesktopEditors](https://github.com/Euro-Office/DesktopEditors/pulls?q=head%3Aforward-port%2Fv{{VERSION}}) - [ ] Tag builds are green: [DocumentServer](https://github.com/Euro-Office/DocumentServer/actions/workflows/release.yml?query=branch%3Av{{VERSION}}), [DesktopEditors](https://github.com/Euro-Office/DesktopEditors/actions/workflows/build.yml?query=branch%3Av{{VERSION}}) A rebuild re-runs the build of the same tag. A content change needs a new version. diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml index 1923525..9039431 100644 --- a/.github/workflows/issue.yml +++ b/.github/workflows/issue.yml @@ -36,7 +36,8 @@ jobs: else echo "::error::invalid version: $VERSION"; exit 1 fi - render() { sed -e "s/{{VERSION}}/$VERSION/g" -e "s/{{BASE}}/$base/g" -e "s/{{BUILD}}/$build/g" "$1"; } + branch=stable-${base%.*} + render() { sed -e "s/{{VERSION}}/$VERSION/g" -e "s/{{BASE}}/$base/g" -e "s/{{BUILD}}/$build/g" -e "s/{{BRANCH}}/$branch/g" "$1"; } title="Release $base" url=$(gh issue list -R "$GITHUB_REPOSITORY" --search "\"$title\" in:title" --json title,url \ diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index bd6456a..8ffe596 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -39,7 +39,7 @@ jobs: [ "$DRY_RUN" != true ] || args+=(--dry-run) ./release.sh tag "$VERSION" "${args[@]}" - - name: Forward-port changelog and version to main + - name: Forward-port the changelog to main if: ${{ !inputs.dry_run }} env: GH_TOKEN: ${{ secrets.EO_ROBOT_GITHUB_TOKEN }} diff --git a/README.md b/README.md index 2e83173..16b184f 100644 --- a/README.md +++ b/README.md @@ -4,53 +4,56 @@ Releases DocumentServer and DesktopEditors with one version and tags it across a ## Releasing -A version (`9.3.6`) is released in rounds: one or more release candidates (`9.3.6-rc.1`, `9.3.6-rc.2`) and the final release, later maybe [patch builds](#patch-builds) (`9.3.6-1`). Each round: +We follow [semantic versioning](https://semver.org). `main` builds the next minor or major version (9.4.0) with features. Each minor version gets one long-lived `stable-X.Y` branch (`stable-9.3`) that only gets backported fixes, so its patch releases (9.3.9, 9.3.10) stay fix-only. We maintain the newest line and the previous one: fixes go to the newest by default, security and important bug fixes also to the previous one. -1. Run **Release issue** with the version. The first round opens the `Release 9.3.6` issue that tracks blockers and the milestone ([template](.github/release/issue.md)); every round adds its [checklist](.github/release/round.md) as a comment. Follow that checklist. -2. Run **Prepare release** with the version. It pins every submodule to its latest default-branch commit, or from the second round on to the latest commit of `stable-9.3.6` (shared submodules get the same commit in both products), bumps `VERSION` / `VERSION.txt`, prepends `CHANGELOG.md` and opens a `release/v` PR in each product. The PR builds are the ones to QA. +A version (`9.4.0`) is released in rounds: one or more release candidates (`9.4.0-rc.1`, `9.4.0-rc.2`) and the final release, later maybe [patch builds](#patch-builds) (`9.4.0-1`). Each round: + +1. Run **Release issue** with the version. The first round opens the `Release 9.4.0` issue that tracks blockers and the milestone ([template](.github/release/issue.md)); every round adds its [checklist](.github/release/round.md) as a comment. Follow that checklist. +2. Run **Prepare release** with the version. It pins every submodule to the latest commit of `stable-9.4`, or of the default branch while that branch does not exist yet (shared submodules get the same commit in both products), bumps `VERSION` / `VERSION.txt`, prepends `CHANGELOG.md` and opens a `release/v` PR in each product. The PR builds are the ones to QA. 3. Review and merge the release PRs. -4. Run **Tag release** with the same version and approve the `release` environment. It checks the merged PRs and that shared submodules match, then tags every submodule and finally the products, which starts their builds. The first tag of a version also creates `stable-9.3.6` at the tagged commit in every repo. -5. The tag builds publish the GitHub releases, images and packages: rc tags as prereleases, the final tag as latest. The Nextcloud Office desktop installers still have to be signed and uploaded by hand. +4. Run **Tag release** with the same version and approve the `release` environment. It checks the merged PRs and that shared submodules match, then tags every submodule and finally the products, which starts their builds. The first tag of a minor version (`9.4.0-rc.1`) also creates `stable-9.4` at the tagged commit in every repo. +5. The tag builds publish the GitHub releases, images and packages: rc tags as prereleases, final tags as stable. Only the highest stable version becomes latest. The Nextcloud Office desktop installers still have to be signed and uploaded by hand. + +Everything after the first round only gets what is backported: merge a fix on `main` first, then comment `/backport to stable-9.4` on the merged PR. The release PRs of these rounds target the branch, so **Tag release** opens a `forward-port/v` PR on `main` with the round's `CHANGELOG.md` section. `main` keeps its own version. Locally: `./release.sh forward-port 9.4.0 --dry-run`. -Later rounds only get what is backported: merge a fix on `main` first, then comment `/backport to stable-9.3.6` on the merged PR. The release PRs of these rounds target the branch, so **Tag release** opens a `forward-port/v` PR on `main` with the round's `CHANGELOG.md` section and, after a final release or patch build, moves `VERSION` on `main` to the next patch version (9.3.6 → 9.3.7) unless `main` is already ahead. The next rc.1 sets the real next version. Locally: `./release.sh forward-port 9.3.6 --dry-run`. +The changelog covers the changes since the highest release below the version, so a 9.3.10 after 9.4.0 lists the changes since 9.3.9. Turn off `bump_submodules` to keep the submodule commits the products already point at (`--no-bump` locally); `tag` still checks that shared submodules match. `products` limits a release to `ds` or `de`. The skipped product does not get that version. -### Hotfixes - -A hotfix of a released version is the next patch version, released from a branch of the previous one and usually without rc rounds. For a hotfix of 9.3.6: +### Patch versions -1. Create `stable-9.3.7` at the head of `stable-9.3.6` in both products and every submodule: - ```sh - for repo in DocumentServer DesktopEditors $(for p in DocumentServer DesktopEditors; do - gh api "repos/Euro-Office/$p/contents/.gitmodules" -H 'Accept: application/vnd.github.raw' - done | sed -nE 's#.*github\.com/Euro-Office/([^/]+)\.git$#\1#p' | sort -u); do - sha=$(gh api "repos/Euro-Office/$repo/git/ref/heads/stable-9.3.6" --jq .object.sha) && - gh api "repos/Euro-Office/$repo/git/refs" -f ref=refs/heads/stable-9.3.7 -f sha="$sha" >/dev/null && - echo "$repo: created stable-9.3.7 at $sha" - done - ``` -2. Merge the fix on `main` and comment `/backport to stable-9.3.7` on the merged PR. -3. Release `9.3.7` as above. Since `stable-9.3.7` exists, prepare pins from it, the release PRs target it and the changelog covers the changes since `v9.3.6`. - -The next feature release from `main` then becomes 9.3.8 or 9.4.0. Letter suffixes like `9.3.6-hotfix.1` build as prereleases (`9.3.6-0~hotfix.1`), which apt and dnf sort before `9.3.6-0`. +A patch version (`9.3.9`) is released from `stable-9.3` like any round, usually without rc rounds: backport the fixes, then release it. Prepare refuses a patch version without its `stable-X.Y` branch. Letter suffixes like `9.3.9-hotfix.1` build as prereleases (`9.3.9-0~hotfix.1`), which apt and dnf sort before `9.3.9-0`. ### Patch builds -Dependency bumps and small fixes of a released version can ship as a patch build instead of a new patch version: `9.3.7-1` is build number 1 of 9.3.7 (`9.3.7` itself is build 0). +Dependency bumps and small fixes of the newest patch version of a line can ship as a patch build instead of a new patch version: `9.3.9-1` is build number 1 of 9.3.9 (`9.3.9` itself is build 0). -| | 9.3.7 | 9.3.7-1 | +| | 9.3.9 | 9.3.9-1 | |---|---|---| -| deb/rpm | `9.3.7-0` | `9.3.7-1` | -| Windows | `9.3.7.0` | `9.3.7.1` | -| download dir | `9.3.7/0` | `9.3.7/1` | +| deb/rpm | `9.3.9-0` | `9.3.9-1` | +| Windows | `9.3.9.0` | `9.3.9.1` | +| download dir | `9.3.9/0` | `9.3.9/1` | + +1. Backport the changes to `stable-9.3` (`/backport to stable-9.3`). +2. Release `9.3.9-1` as above, without rc rounds: QA the release PR builds. Prepare pins from `stable-9.3` and the changelog covers the changes since `v9.3.9`. The build is stable: APT/DNF and releases, `latest` only if it is the highest stable version. -1. Backport the changes to `stable-9.3.7` (`/backport to stable-9.3.7`). -2. Release `9.3.7-1` as above, without rc rounds: QA the release PR builds. Prepare pins from `stable-9.3.7` and the changelog covers the changes since `v9.3.7`. The build is stable: APT/DNF, `latest` images and releases. +`9.3.9-0` and prereleases of patch builds (`9.3.9-1-rc.1`) are rejected, both would sort wrong. Once 9.3.10 shipped, `9.3.9-2` is no longer possible. Use a new patch version (9.3.10) for fixes users should notice. -`9.3.7-0` and prereleases of patch builds (`9.3.7-1-rc.1`) are rejected, both would sort wrong. Use a new patch version (9.3.8) for fixes users should notice. +### Creating a stable branch by hand + +`stable-9.3` predates this flow and was created by hand from `stable-9.3.8`, in both products and every submodule: + +```sh +for repo in DocumentServer DesktopEditors $(for p in DocumentServer DesktopEditors; do + gh api "repos/Euro-Office/$p/contents/.gitmodules" -H 'Accept: application/vnd.github.raw' + done | sed -nE 's#.*github\.com/Euro-Office/([^/]+)\.git$#\1#p' | sort -u); do + sha=$(gh api "repos/Euro-Office/$repo/git/ref/heads/stable-9.3.8" --jq .object.sha) && + gh api "repos/Euro-Office/$repo/git/refs" -f ref=refs/heads/stable-9.3 -f sha="$sha" >/dev/null && + echo "$repo: created stable-9.3 at $sha" +done +``` ## Local use diff --git a/release.sh b/release.sh index 03691e4..68874cf 100755 --- a/release.sh +++ b/release.sh @@ -33,15 +33,21 @@ valid_version() { [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+|-[1-9][0-9]*) # A numeric suffix (v9.3.7-1) is a patch build of a stable release. is_stable() { [[ $1 =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?$ ]]; } is_patch() { [[ $1 =~ ^v[0-9]+\.[0-9]+\.[0-9]+-[0-9]+$ ]]; } +# Only X.Y.0 and its rounds may start from main, later patch versions and patch builds need stable-X.Y. +needs_branch() { [[ $1 =~ ^v[0-9]+\.[0-9]+\.([0-9]+) ]] && { [ "${BASH_REMATCH[1]}" != 0 ] || is_patch "$1"; }; } -# stdin: tags, newest first. A stable release compares against the previous stable one. +# stdin: tags. Prints the highest release below , so a 9.3.10 after 9.4.0 compares against 9.3.9. +# A stable release compares against the previous stable one. previous_tag() { - local re='v[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?' + local re='v[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?' key t is_stable "$1" || re='v[0-9]+\.[0-9]+\.[0-9]+(-[0-9a-z.]+)?' - grep -Ex "$re" | grep -vxF "$1" | head -n 1 || true + key=$(version_key "$1") + { grep -Ex "$re" || true; } | while read -r t; do echo "$(version_key "$t") $t"; done | + awk -v k="$key" '($1 "") < (k "") { print }' | sort | tail -n 1 | cut -d ' ' -f 2 } -release_branch() { echo "stable-${1%%-*}"; } +# One long-lived branch per minor version: 9.3.6-rc.1, 9.3.7 and 9.3.7-1 all release from stable-9.3. +release_branch() { local v=${1%%-*}; echo "stable-${v%.*}"; } # Sortable key of 9.3.7, v9.3.7-rc.1 or 9.3.7-1: prereleases sort before the release, patch builds after it. version_key() { @@ -175,13 +181,6 @@ insert_changelog() { # stdin: a changelog. Prints the section of . changelog_section() { awk -v h="## $1" '/^## / { on = $0 == h } on'; } -# Version of main () after the final release : at least the next patch version. -main_version() { - local next=${2%%-*} - next=${next%.*}.$((${next##*.} + 1)) - if [[ $(version_key "${1%%-*}") < $(version_key "$next") ]]; then echo "$next"; else echo "$1"; fi -} - # Keeps the existing trailing-newline style of the version file. write_version() { if [ -n "$(tail -c 1 "$1")" ]; then printf '%s' "$2" >"$1"; else echo "$2" >"$1"; fi; } @@ -208,7 +207,7 @@ notes_product() { git ls-remote --exit-code "https://github.com/$OWNER/$repo.git" "refs/heads/$BRANCH" >/dev/null || rc=$? case $rc in 0) ref=refs/heads/$BRANCH base=$BRANCH ;; - 2) ! is_patch "$TAG" || die "$repo: patch build $TAG needs $BRANCH, release the version first or use --products" ;; + 2) ! needs_branch "$TAG" || die "$repo: $TAG needs $BRANCH, the first tag of ${BRANCH#stable-}.0 creates it (or by hand, see README.md)" ;; *) die "$repo: cannot look up $BRANCH" ;; esac echo "$base" >"$out.base" @@ -310,12 +309,12 @@ cmd_prepare() { fi } -# Rounds from a stable branch never reach main: copy their changelog section to main and, -# after a final release, move main to the next patch version so its builds sort after the release. +# Rounds from a stable branch never reach main: copy their changelog section to main. +# main keeps its own version, the next minor or major. cmd_forward_port() { - local p repo vfile dir url + local p repo dir url for p in $PRODUCTS; do - read -r repo vfile < <(product "$p") + read -r repo _ < <(product "$p") dir="$WORK/$repo" gh api "repos/$OWNER/$repo/contents/CHANGELOG.md?ref=$TAG" -H 'Accept: application/vnd.github.raw' | changelog_section "$TAG" >"$WORK/$repo.section.md" @@ -324,7 +323,6 @@ cmd_forward_port() { git -C "$dir" checkout -q -b "forward-port/$TAG" [ -f "$dir/CHANGELOG.md" ] || die "$repo: main has no CHANGELOG.md" grep -qxF "## $TAG" "$dir/CHANGELOG.md" || insert_changelog "$dir/CHANGELOG.md" "$WORK/$repo.section.md" "$TAG" - ! is_stable "$TAG" || write_version "$dir/$vfile" "$(main_version "$(tr -d '[:space:]' <"$dir/$vfile")" "$VERSION")" if git -C "$dir" diff --quiet; then log "$repo: main already has $TAG" continue @@ -338,7 +336,7 @@ cmd_forward_port() { url=$(gh pr view "forward-port/$TAG" -R "$OWNER/$repo" --json url --jq .url 2>/dev/null) || url=$(gh pr create -R "$OWNER/$repo" --base main --head "forward-port/$TAG" \ --title "chore(release): forward-port $TAG to main" \ - --body "Changelog of $TAG and, after a final release, the next patch version on \`main\`. Release PRs from \`$BRANCH\` do not reach \`main\`.") + --body "Changelog of $TAG on \`main\`. Release PRs from \`$BRANCH\` do not reach \`main\`.") log "$repo: $url" done } @@ -417,7 +415,7 @@ cmd_tag() { log "$slug: tagged $TAG" done <"$WORK/todo" - # The first tag of a version branches every repo, so later rounds only get what is backported. + # The first tag of a minor version branches every repo, so later rounds and patch versions only get what is backported. while read -r slug sha; do if gh api "repos/$slug/git/ref/heads/$BRANCH" >/dev/null 2>&1; then log "$slug: $BRANCH exists" @@ -437,8 +435,9 @@ main() { return fi if [ "${1:-}" = notes ]; then - # A prerelease placeholder makes previous_tag pick the latest tag of any kind, its missing branch pins default branches. - TAG=v0.0.0-next.1 BRANCH=$(release_branch 0.0.0) BUMP=true PRODUCTS="ds de" SINCE="" WORK=$(mktemp -d) + # A prerelease placeholder above every version makes previous_tag pick the highest tag of any kind, + # its missing branch pins default branches. + TAG=v999999.0.0-next.1 BRANCH=$(release_branch 999999.0.0) BUMP=true PRODUCTS="ds de" SINCE="" WORK=$(mktemp -d) : >"$WORK/pins" cmd_notes return diff --git a/test.sh b/test.sh index 7251c3c..6213fd2 100755 --- a/test.sh +++ b/test.sh @@ -8,16 +8,23 @@ tags=$'v9.3.5-rc.2\nv9.3.5-rc.1\nv9.3.4-hotfix.1\nv9.3.4\nv99.99.99.4652\nwin-v4 check "rc after rc" "$(previous_tag v9.3.5-rc.3 <<<"$tags")" v9.3.5-rc.2 check "stable after rcs" "$(previous_tag v9.3.5 <<<"$tags")" v9.3.4 check "ignores itself" "$(previous_tag v9.3.5-rc.2 <<<"$tags")" v9.3.5-rc.1 -check "numeric suffix" "$(previous_tag v0.0.0-next.1 <<<$'v9.3.5-2\nv9.3.5-1\nv9.3.1')" v9.3.5-2 +check "numeric suffix" "$(previous_tag v999999.0.0-next.1 <<<$'v9.3.5-2\nv9.3.5-1\nv9.3.1')" v9.3.5-2 +check "patch after next minor" "$(previous_tag v9.3.10 <<<$'v9.4.0\nv9.4.0-rc.1\nv9.3.9-1\nv9.3.9\nv9.3.8')" v9.3.9-1 +check "rc after next minor" "$(previous_tag v9.3.10-rc.1 <<<$'v9.4.0\nv9.3.9\nv9.3.9-rc.1')" v9.3.9 +check "next minor" "$(previous_tag v9.4.0 <<<$'v9.3.10\nv9.4.0-rc.1\nv9.3.9')" v9.3.10 +check "unsorted input" "$(previous_tag v9.3.10 <<<$'v9.3.8\nv9.3.9\nv9.3.7')" v9.3.9 check "stable after rebuild" "$(previous_tag v9.3.6 <<<$'v9.3.6-rc.1\nv9.3.5-2\nv9.3.5-1\nv9.3.1')" v9.3.5-2 check "patch build" "$(previous_tag v9.3.7-1 <<<$'v9.3.7\nv9.3.7-rc.1\nv9.3.6')" v9.3.7 check "second patch build" "$(previous_tag v9.3.7-2 <<<$'v9.3.7-1\nv9.3.7\nv9.3.7-rc.1')" v9.3.7-1 -check "patch build branch" "$(release_branch 9.3.7-1)" stable-9.3.7 +check "patch build branch" "$(release_branch 9.3.7-1)" stable-9.3 +check "two-digit minor branch" "$(release_branch 10.12.3)" stable-10.12 +if ! { needs_branch v9.3.9 && needs_branch v9.3.9-rc.1 && needs_branch v9.4.0-1 && + ! needs_branch v9.4.0 && ! needs_branch v9.4.0-rc.2 && ! needs_branch v10.0.0; }; then echo "FAIL needs_branch"; exit 1; fi if ! { is_patch v9.3.7-1 && ! is_patch v9.3.7 && ! is_patch v9.3.7-rc.1; }; then echo "FAIL is_patch"; exit 1; fi check "no previous" "$(previous_tag v1.0.0 <<<"")" "" if (check_shared <(printf 'a/core 1\na/core 2\na/sdkjs 3\n')) 2>/dev/null; then echo "FAIL check_shared mismatch"; exit 1; fi check_shared <(printf 'a/core 1\na/sdkjs 3\n') -check "release branch" "$(release_branch 9.3.6-rc.2)" stable-9.3.6 +check "release branch" "$(release_branch 9.3.6-rc.2)" stable-9.3 check "slug https" "$(slug https://github.com/Euro-Office/core.git)" Euro-Office/core check "slug ssh" "$(slug git@github.com:Euro-Office/core)" Euro-Office/core if ! { valid_version 9.3.6 && valid_version 9.3.6-rc.1 && valid_version 9.3.7-1 && valid_version 9.3.7-12 && valid_version 9.3.7-beta.1 && @@ -64,10 +71,6 @@ check "new changelog" "$(cat "$tmp/CHANGELOG.md")" $'# Changelog\n\n## v9.3.6\n\ check "version order" "$(for v in v9.3.7-1 9.3.5 v9.3.8-rc.1 v9.3.7 v9.3.7-rc.2 v9.3.10 v9.3.7-rc.10; do echo "$(version_key "$v") $v"; done | sort | awk '{ print $2 }' | xargs)" \ "9.3.5 v9.3.7-rc.2 v9.3.7-rc.10 v9.3.7 v9.3.7-1 v9.3.8-rc.1 v9.3.10" if version_key "Unreleased" >/dev/null; then echo "FAIL version_key accepts non-versions"; exit 1; fi -check "main after final" "$(main_version 9.3.8-rc.1 9.3.8)" 9.3.9 -check "main after patch build" "$(main_version 9.3.8 9.3.8-1)" 9.3.9 -check "main ahead of hotfix" "$(main_version 9.3.8-rc.1 9.3.7-1)" 9.3.8-rc.1 -check "main ahead of release" "$(main_version 9.4.0-rc.1 9.3.8)" 9.4.0-rc.1 printf '# Changelog\n\n## v9.3.8-rc.1\n\n* d\n\n## v9.3.6-rc.1\n\n* a\n\n## 9.3.5\n\n* old\n' >"$tmp/CHANGELOG.md" printf '# Changelog\n\n## v9.3.7\n\n* c\n\n## v9.3.6\n\n### Bug fixes\n\n* b\n\n## v9.3.6-rc.1\n\n* a\n' | changelog_section v9.3.6 >"$tmp/section" check "changelog_section" "$(cat "$tmp/section")" $'## v9.3.6\n\n### Bug fixes\n\n* b' From 505a8d9fb8c0982c55917b55bc843ed8ce070712 Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Mon, 16 Nov 2026 16:55:39 +0100 Subject: [PATCH 2/2] docs: mention the backport-request label Signed-off-by: Julius Knorr No-test: docs only Assisted-by: ClaudeCode:claude-opus-5-5 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 16b184f..69c9731 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ A version (`9.4.0`) is released in rounds: one or more release candidates (`9.4. 4. Run **Tag release** with the same version and approve the `release` environment. It checks the merged PRs and that shared submodules match, then tags every submodule and finally the products, which starts their builds. The first tag of a minor version (`9.4.0-rc.1`) also creates `stable-9.4` at the tagged commit in every repo. 5. The tag builds publish the GitHub releases, images and packages: rc tags as prereleases, final tags as stable. Only the highest stable version becomes latest. The Nextcloud Office desktop installers still have to be signed and uploaded by hand. -Everything after the first round only gets what is backported: merge a fix on `main` first, then comment `/backport to stable-9.4` on the merged PR. The release PRs of these rounds target the branch, so **Tag release** opens a `forward-port/v` PR on `main` with the round's `CHANGELOG.md` section. `main` keeps its own version. Locally: `./release.sh forward-port 9.4.0 --dry-run`. +Everything after the first round only gets what is backported: merge a fix on `main` first (label it `backport-request` so it is not forgotten), then comment `/backport to stable-9.4` on the merged PR. The release PRs of these rounds target the branch, so **Tag release** opens a `forward-port/v` PR on `main` with the round's `CHANGELOG.md` section. `main` keeps its own version. Locally: `./release.sh forward-port 9.4.0 --dry-run`. The changelog covers the changes since the highest release below the version, so a 9.3.10 after 9.4.0 lists the changes since 9.3.9.