chore: update scripts, workflows and documentation to support release-52

This commit is contained in:
Ivan Dyachkov 2023-08-11 11:11:58 +02:00
parent bab05b6613
commit 7bdefd065f
6 changed files with 29 additions and 6 deletions

View File

@ -1,6 +1,6 @@
Fixes <issue-or-jira-number> Fixes <issue-or-jira-number>
<!-- Make sure to target release-51 branch if this PR is intended to fix the issues for the release candidate. --> <!-- Make sure to target release-52 branch if this PR is intended to fix the issues for the release candidate. -->
## Summary ## Summary
copilot:summary copilot:summary

View File

@ -12,6 +12,7 @@ on:
branches: branches:
- 'master' - 'master'
- 'release-51' - 'release-51'
- 'release-52'
- 'ci/**' - 'ci/**'
env: env:

View File

@ -24,6 +24,7 @@ jobs:
profile: profile:
- ['emqx', 'master'] - ['emqx', 'master']
- ['emqx-enterprise', 'release-51'] - ['emqx-enterprise', 'release-51']
- ['emqx-enterprise', 'release-52']
otp: otp:
- 25.3.2-1 - 25.3.2-1
arch: arch:

View File

@ -21,6 +21,7 @@ options:
-b|--base: Specify the current release base branch, can be one of -b|--base: Specify the current release base branch, can be one of
release-51 release-51
release-52
NOTE: this option should be used when --dryrun. NOTE: this option should be used when --dryrun.
--dryrun: Do not actually create the git tag. --dryrun: Do not actually create the git tag.
@ -35,10 +36,15 @@ options:
in addition to regular :<version> one in addition to regular :<version> one
NOTE: For 5.1 series the current working branch must be 'release-51' For 5.1 series the current working branch must be 'release-51'
--.--[ master ]---------------------------.-----------.--- --.--[ master ]---------------------------.-----------.---
\\ / \\ /
\`---[release-51]----(v5.1.1 | e5.1.1) \`---[release-51]----(v5.1.1 | e5.1.1)
For 5.2 series the current working branch must be 'release-52'
--.--[ master ]---------------------------.-----------.---
\\ /
\`---[release-52]----(v5.2.1 | e5.2.1)
EOF EOF
} }
@ -133,6 +139,12 @@ rel_branch() {
e5.1.*) e5.1.*)
echo 'release-51' echo 'release-51'
;; ;;
v5.2.*)
echo 'release-52'
;;
e5.2.*)
echo 'release-52'
;;
*) *)
logerr "Unsupported version tag $TAG" logerr "Unsupported version tag $TAG"
exit 1 exit 1

View File

@ -5,7 +5,7 @@ set -euo pipefail
# ensure dir # ensure dir
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/../.."
BASE_BRANCHES=( 'release-51' 'master' ) BASE_BRANCHES=( 'release-52' 'release-51' 'master' )
usage() { usage() {
cat <<EOF cat <<EOF
@ -18,8 +18,9 @@ options:
It tries to merge (by default with --ff-only option) It tries to merge (by default with --ff-only option)
upstreams branches for the current working branch. upstreams branches for the current working branch.
The uppstream branch of the current branch are as below: The uppstream branch of the current branch are as below:
* release-51: [] # no upstream for 5.0 opensource edition * release-52: [] # no upstream for 5.2 opensource edition
* master: [release-51] # sync release-51 to master * release-51: [] # no upstream for 5.1 opensource edition
* master: [release-52] # sync release-52 to master
-b|--base: -b|--base:
The base branch of current working branch if currently is not The base branch of current working branch if currently is not
@ -151,11 +152,14 @@ remote_refs() {
upstream_branches() { upstream_branches() {
local base="$1" local base="$1"
case "$base" in case "$base" in
release-52)
remote_ref "$base"
;;
release-51) release-51)
remote_ref "$base" remote_ref "$base"
;; ;;
master) master)
remote_refs "$base" 'release-51' remote_refs "$base" 'release-52'
;; ;;
esac esac
} }

View File

@ -93,6 +93,11 @@ Unrecognized tag: refs/tags/v5.2.0-alpha-1
{"profile": "emqx-enterprise", "release": false, "latest": false} {"profile": "emqx-enterprise", "release": false, "latest": false}
>>>= 0 >>>= 0
./parse-git-ref.sh refs/heads/release-52
>>>
{"profile": "emqx-enterprise", "release": false, "latest": false}
>>>= 0
./parse-git-ref.sh refs/heads/ci/foobar ./parse-git-ref.sh refs/heads/ci/foobar
>>> >>>
{"profile": "emqx", "release": false, "latest": false} {"profile": "emqx", "release": false, "latest": false}