Merge pull request #11442 from zmstone/0814-sync-release-52-to-master

0814 sync release 52 to master
This commit is contained in:
Zaiming (Stone) Shi 2023-08-15 16:21:55 +02:00 committed by GitHub
commit fa9e9f3348
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 33 additions and 33 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

@ -35,7 +35,7 @@
-define(EMQX_RELEASE_CE, "5.1.5-build.3"). -define(EMQX_RELEASE_CE, "5.1.5-build.3").
%% Enterprise edition %% Enterprise edition
-define(EMQX_RELEASE_EE, "5.1.1"). -define(EMQX_RELEASE_EE, "5.2.0-alpha.1").
%% The HTTP API version %% The HTTP API version
-define(EMQX_API_VERSION, "5.0"). -define(EMQX_API_VERSION, "5.0").

View File

@ -14,8 +14,8 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
version: 5.1.1 version: 5.2.0-alpha.1
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. # incremented each time you make changes to the application.
appVersion: 5.1.1 appVersion: 5.2.0-alpha.1

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.
@ -31,14 +32,16 @@ options:
--prev-tag <tag>: Provide the prev tag to automatically generate changelogs --prev-tag <tag>: Provide the prev tag to automatically generate changelogs
If this option is absent, the tag found by git describe will be used If this option is absent, the tag found by git describe will be used
--docker-latest: Set this option to assign :latest tag on the corresponding docker image
in addition to regular :<version> one
For 5.1 series the current working branch must be 'release-51'
NOTE: 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
} }
@ -55,21 +58,18 @@ logmsg() {
} }
TAG="${1:-}" TAG="${1:-}"
DOCKER_LATEST_TAG=
case "$TAG" in case "$TAG" in
v*) v*)
TAG_PREFIX='v' TAG_PREFIX='v'
PROFILE='emqx' PROFILE='emqx'
SKIP_APPUP='yes' SKIP_APPUP='yes'
DOCKER_LATEST_TAG='docker-latest-ce'
;; ;;
e*) e*)
TAG_PREFIX='e' TAG_PREFIX='e'
PROFILE='emqx-enterprise' PROFILE='emqx-enterprise'
#TODO change to no when we are ready to support hot-upgrade #TODO change to no when we are ready to support hot-upgrade
SKIP_APPUP='yes' SKIP_APPUP='yes'
DOCKER_LATEST_TAG='docker-latest-ee'
;; ;;
-h|--help) -h|--help)
usage usage
@ -85,7 +85,6 @@ esac
shift 1 shift 1
DRYRUN='no' DRYRUN='no'
DOCKER_LATEST='no'
while [ "$#" -gt 0 ]; do while [ "$#" -gt 0 ]; do
case $1 in case $1 in
-h|--help) -h|--help)
@ -113,10 +112,6 @@ while [ "$#" -gt 0 ]; do
PREV_TAG="$1" PREV_TAG="$1"
shift shift
;; ;;
--docker-latest)
DOCKER_LATEST='yes'
shift
;;
*) *)
logerr "Unknown option $1" logerr "Unknown option $1"
exit 1 exit 1
@ -133,6 +128,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
@ -254,9 +255,6 @@ generate_changelog () {
if [ "$DRYRUN" = 'yes' ]; then if [ "$DRYRUN" = 'yes' ]; then
logmsg "Release tag is ready to be created with command: git tag $TAG" logmsg "Release tag is ready to be created with command: git tag $TAG"
if [ "$DOCKER_LATEST" = 'yes' ]; then
logmsg "Docker latest tag is ready to be created with command: git tag --force $DOCKER_LATEST_TAG"
fi
else else
case "$TAG" in case "$TAG" in
*rc*) *rc*)
@ -274,14 +272,6 @@ else
esac esac
git tag "$TAG" git tag "$TAG"
logmsg "$TAG is created OK." logmsg "$TAG is created OK."
if [ "$DOCKER_LATEST" = 'yes' ]; then logwarn "Don't forget to push the tag!"
git tag --force "$DOCKER_LATEST_TAG" echo "git push origin $TAG"
logmsg "$DOCKER_LATEST_TAG is created OK."
fi
logwarn "Don't forget to push the tags!"
if [ "$DOCKER_LATEST" = 'yes' ]; then
echo "git push --atomic --force origin $TAG $DOCKER_LATEST_TAG"
else
echo "git push origin $TAG"
fi
fi fi

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}