|
@@ -19,15 +19,23 @@ RELEASE_GIT_TAG is a 'v*' or 'e*' tag for example:
|
|
|
e5.0.0-beta.6
|
|
e5.0.0-beta.6
|
|
|
|
|
|
|
|
options:
|
|
options:
|
|
|
- -h|--help: Print this usage.
|
|
|
|
|
- -b|--base: Specify the current release base branch, can be one of
|
|
|
|
|
- release-50
|
|
|
|
|
- NOTE: this option should be used when --dryrun.
|
|
|
|
|
- --dryrun: Do not actually create the git tag.
|
|
|
|
|
- --skip-appup: Skip checking appup
|
|
|
|
|
- Useful when you are sure that appup is already updated'
|
|
|
|
|
- --prev-tag: Provide the prev tag to automatically generate changelogs
|
|
|
|
|
- If this option is absent, the tag found by git describe will be used
|
|
|
|
|
|
|
+ -h|--help: Print this usage.
|
|
|
|
|
+
|
|
|
|
|
+ -b|--base: Specify the current release base branch, can be one of
|
|
|
|
|
+ release-50
|
|
|
|
|
+ NOTE: this option should be used when --dryrun.
|
|
|
|
|
+
|
|
|
|
|
+ --dryrun: Do not actually create the git tag.
|
|
|
|
|
+
|
|
|
|
|
+ --skip-appup: Skip checking appup
|
|
|
|
|
+ Useful when you are sure that appup is already updated'
|
|
|
|
|
+
|
|
|
|
|
+ --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
|
|
|
|
|
+
|
|
|
|
|
+ --docker-latest: Set this option to assign :latest tag on the corresponding docker image
|
|
|
|
|
+ in addition to regular :<version> one
|
|
|
|
|
+
|
|
|
|
|
|
|
|
NOTE: For 5.0 series the current working branch must be 'release-50' for opensource edition
|
|
NOTE: For 5.0 series the current working branch must be 'release-50' for opensource edition
|
|
|
and 'release-e50' for enterprise edition.
|
|
and 'release-e50' for enterprise edition.
|
|
@@ -45,18 +53,21 @@ 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
|
|
@@ -72,6 +83,7 @@ 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)
|
|
@@ -99,6 +111,10 @@ 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
|
|
@@ -180,11 +196,11 @@ assert_release_version() {
|
|
|
assert_release_version "$TAG"
|
|
assert_release_version "$TAG"
|
|
|
|
|
|
|
|
## Check if all upstream branches are merged
|
|
## Check if all upstream branches are merged
|
|
|
-if [ -z "${BASE_BR:-}" ]; then
|
|
|
|
|
- ./scripts/rel/sync-remotes.sh
|
|
|
|
|
-else
|
|
|
|
|
- ./scripts/rel/sync-remotes.sh --base "$BASE_BR"
|
|
|
|
|
-fi
|
|
|
|
|
|
|
+SYNC_REMOTES_ARGS=
|
|
|
|
|
+[ -n "${BASE_BR:-}" ] && SYNC_REMOTES_ARGS="--base $BASE_BR $SYNC_REMOTES_ARGS"
|
|
|
|
|
+[ "$DRYRUN" = 'yes' ] && SYNC_REMOTES_ARGS="--dryrun $SYNC_REMOTES_ARGS"
|
|
|
|
|
+# shellcheck disable=SC2086
|
|
|
|
|
+./scripts/rel/sync-remotes.sh $SYNC_REMOTES_ARGS
|
|
|
|
|
|
|
|
## Check if the Chart versions are in sync
|
|
## Check if the Chart versions are in sync
|
|
|
./scripts/rel/check-chart-vsn.sh "$PROFILE"
|
|
./scripts/rel/check-chart-vsn.sh "$PROFILE"
|
|
@@ -231,6 +247,9 @@ 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*)
|
|
@@ -252,4 +271,8 @@ else
|
|
|
esac
|
|
esac
|
|
|
git tag "$TAG"
|
|
git tag "$TAG"
|
|
|
logmsg "$TAG is created OK."
|
|
logmsg "$TAG is created OK."
|
|
|
|
|
+ if [ "$DOCKER_LATEST" = 'yes' ]; then
|
|
|
|
|
+ git tag --force "$DOCKER_LATEST_TAG"
|
|
|
|
|
+ logmsg "$DOCKER_LATEST_TAG is created OK."
|
|
|
|
|
+ fi
|
|
|
fi
|
|
fi
|