ci: adapt relup script for 4.5.0
This commit is contained in:
parent
710887bde3
commit
5d431fdd64
15
build
15
build
|
@ -71,7 +71,14 @@ make_relup() {
|
|||
local lib_dir="_build/$PROFILE/rel/emqx/lib"
|
||||
local releases_dir="_build/$PROFILE/rel/emqx/releases"
|
||||
local name_pattern
|
||||
name_pattern="${PROFILE}-$(./scripts/pkg-full-vsn.sh 'vsn_matcher')"
|
||||
# 4.5.0 upgraded OTP from 24.1.5-3 to 24.3.4.2-1, so we need to
|
||||
# fool the matcher to make it pick up the previous 4.4.X releases
|
||||
# with older OTP.
|
||||
if [[ "${PKG_VSN}" == 4.5.0* ]]; then
|
||||
name_pattern="${PROFILE}-$(env OTP_VSN=24.1.5-3 ./scripts/pkg-full-vsn.sh 'vsn_matcher')"
|
||||
else
|
||||
name_pattern="${PROFILE}-$(./scripts/pkg-full-vsn.sh 'vsn_matcher')"
|
||||
fi
|
||||
mkdir -p "$lib_dir" "$releases_dir" '_upgrade_base'
|
||||
local releases=()
|
||||
if [ -d "$releases_dir" ]; then
|
||||
|
@ -96,8 +103,8 @@ make_relup() {
|
|||
fi
|
||||
RELX_BASE_VERSIONS="$(IFS=, ; echo "${releases[*]}")"
|
||||
export RELX_BASE_VERSIONS
|
||||
if [[ ${PKG_VSN} == 4.3* ]]; then
|
||||
echo "EMQX 4.3 specific, overwrite OTP app versions"
|
||||
if [[ ${PKG_VSN} == 4.3* || ${PKG_VSN} == 4.5.0* ]]; then
|
||||
echo "EMQX 4.3/4.5 specific, overwrite OTP app versions"
|
||||
local emqx_rel_file="${releases_dir}/${PKG_VSN}/emqx.rel"
|
||||
if [ ! -f "${emqx_rel_file}" ]; then
|
||||
./rebar3 as "${PROFILE}" release
|
||||
|
@ -115,7 +122,7 @@ make_relup() {
|
|||
|
||||
# rollback rel file per releases
|
||||
#
|
||||
if [[ ${PKG_VSN} == 4.3* ]]; then
|
||||
if [[ ${PKG_VSN} == 4.3* || ${PKG_VSN} == 4.5.0* ]]; then
|
||||
echo "restore upgrade base rel files... "
|
||||
for rel in ${releases[*]};
|
||||
do
|
||||
|
|
|
@ -18,7 +18,7 @@ case "${VSN_MATCH}" in
|
|||
PKG_VSN='*'
|
||||
;;
|
||||
*)
|
||||
echo "$0 ERROR: second arg must "
|
||||
echo "$0 ERROR: arg must be either 'vsn_exact' or 'vsn_matcher'"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -63,6 +63,13 @@ cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
|
|||
mkdir -p _upgrade_base
|
||||
pushd _upgrade_base
|
||||
|
||||
# For 4.5, we upgrade from OTP 24.1.5-3 to 24.3.4.2-1, so we must manually
|
||||
# check the old OTP releases.
|
||||
CURRENT_VERSION="$(../pkg-vsn.sh)"
|
||||
if [[ "${CURRENT_VERSION}" = 4.5.0* ]]; then
|
||||
OTP_VSN=24.1.5-3
|
||||
fi
|
||||
|
||||
for tag in $(../scripts/relup-base-vsns.sh $EDITION | xargs echo -n); do
|
||||
filename="$PROFILE-${tag#[e|v]}-otp$OTP_VSN-$SYSTEM-$ARCH.zip"
|
||||
url="https://packages.emqx.io/$DIR/$tag/$filename"
|
||||
|
|
|
@ -61,6 +61,14 @@ esac
|
|||
# must not be empty for MacOS (bash 3.x)
|
||||
TAGS=( 'dummy' )
|
||||
TAGS_EXCLUDE=( 'dummy' )
|
||||
|
||||
# first 4.5.0 version uses the previous 4.4.X as a base
|
||||
# we emulate that we are the last 4.4.X version.
|
||||
if [[ "${CUR_SEMVER[0]}" = 4 && "${CUR_SEMVER[1]}" = 5 && "${CUR_SEMVER[2]}" = 0 ]]; then
|
||||
CUR_SEMVER[1]=4
|
||||
CUR_SEMVER[2]=9999
|
||||
fi
|
||||
|
||||
while read -r git_tag; do
|
||||
# shellcheck disable=SC2207
|
||||
semver=($(parse_semver "$git_tag"))
|
||||
|
|
Loading…
Reference in New Issue