Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

release: Allow major releases from the matching release branch.

Benjamin Prewd0b01c69b143
diff --git a/docs/processes/release-checklist.md b/docs/processes/release-checklist.md
index 21597c39741..51e8560cc92 100644
--- a/docs/processes/release-checklist.md
+++ b/docs/processes/release-checklist.md
@@ -57,8 +57,8 @@ preparing a new release.
### Executing the release
-- Create the release commit, on `main` (for major releases) or on the
- release branch (for minor releases):
+- Create the release commit, on `main` or the release branch (for
+ major releases) or on the release branch (for minor releases):
- Copy the Markdown release notes for the release into
`docs/overview/changelog.md`.
- Verify the changelog passes lint, and has the right release date.
@@ -98,7 +98,8 @@ preparing a new release.
once it is built, and how to test it. Verify it, then publish it to
DigitalOcean marketplace.
- _Major releases only:_
- - Create a release branch (e.g., `4.x`).
+ - Create a release branch (e.g., `4.x`), if the release was made
+ from `main`.
- On the release branch, update `ZULIP_VERSION` in `version.py` to
the present release with a `+git` suffix, e.g., `4.0+git`.
- On `main`, update `ZULIP_VERSION` to the future major release with
@@ -131,9 +132,10 @@ preparing a new release.
- _Prereleases only (e.g., 7.0-beta3):_
- Atop the prerelease commit (e.g., `7.0-beta3`), make a commit
updating `ZULIP_VERSION` to the prerelease version with a `+git`
- suffix, e.g., `7.0-beta3+git`. Push this to `main`. (If `main` has
- already diverged from the prerelease, a merge commit will be
- needed here.)
+ suffix, e.g., `7.0-beta3+git`. Push this to the branch the
+ prerelease was made from (`main` or the release branch). (If that
+ branch has already diverged from the prerelease, a merge commit
+ will be needed here.)
### Important permissions for executing the release
diff --git a/tools/release b/tools/release
index 6ed5e0232ed..90bd65f0d71 100755
--- a/tools/release
+++ b/tools/release
@@ -29,17 +29,18 @@ if [[ "$version" =~ -[0-9a-z]+$ ]]; then
is_prerelease=1
fi
+release_branch="$(echo "$version" | perl -ple 's/\..*/.x/')"
+
is_major_release=
if [[ "$version" =~ ^[0-9]+\.0(-[0-9a-z]+)?$ ]]; then
- [ "$branch" == "main" ] \
- || fail "Did not expect $version to be released from $branch, expected main"
+ [ "$branch" == "main" ] || [ "$branch" == "$release_branch" ] \
+ || fail "Did not expect $version to be released from $branch, expected main or $release_branch"
if [ -z "$is_prerelease" ]; then
is_major_release=1
fi
else
- expected_branch="$(echo "$version" | perl -ple 's/\..*/.x/')"
- [ "$branch" == "$expected_branch" ] \
- || fail "Did not expect $version to be released from $branch, expected $expected_branch"
+ [ "$branch" == "$release_branch" ] \
+ || fail "Did not expect $version to be released from $branch, expected $release_branch"
fi
# shellcheck source=lib/git-tools.bash