chore: prepare for 4.5+ and consider 4.4.9+
This commit is contained in:
parent
5c720a01a3
commit
257a86a576
4
build
4
build
|
@ -188,8 +188,8 @@ make_zip() {
|
|||
esac
|
||||
;;
|
||||
esac
|
||||
## one can only upgrade to 4.5.X from 4.4.8, when that's released.
|
||||
## Until that's released, there's no relup.
|
||||
## one can only upgrade to 4.5.X from 4.4.8 or later, when that's
|
||||
## released. Until that's released, there's no relup.
|
||||
if [[ -z "$(ls -A _upgrade_base 2>/dev/null || true)" && "${PKG_VSN}" == 4.5.0* ]]; then
|
||||
has_relup='no'
|
||||
fi
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
-ifndef(EMQX_ENTERPRISE).
|
||||
|
||||
-define(EMQX_RELEASE, {opensource, "4.5.0"}).
|
||||
-define(EMQX_RELEASE, {opensource, "4.5.0-alpha.1"}).
|
||||
|
||||
-else.
|
||||
|
||||
|
|
|
@ -63,15 +63,21 @@ 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
|
||||
# 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
|
||||
otp_vsn_for() {
|
||||
case "${1#[e|v]}" in
|
||||
4.4.*)
|
||||
echo "24.1.5-3"
|
||||
;;
|
||||
4.5.*)
|
||||
echo "$OTP_VSN"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
for tag in $(../scripts/relup-base-vsns.sh $EDITION | xargs echo -n); do
|
||||
filename="$PROFILE-${tag#[e|v]}-otp$OTP_VSN-$SYSTEM-$ARCH.zip"
|
||||
filename="$PROFILE-${tag#[e|v]}-otp$(otp_vsn_for "$tag")-$SYSTEM-$ARCH.zip"
|
||||
url="https://packages.emqx.io/$DIR/$tag/$filename"
|
||||
if [ ! -f "$filename" ] && curl -L -I -m 10 -o /dev/null -s -w "%{http_code}" "${url}" | grep -q -oE "^[23]+" ; then
|
||||
echo "downloading base package from ${url} ..."
|
||||
|
|
|
@ -89,12 +89,20 @@ for tag_to_del in "${TAGS_EXCLUDE[@]}"; do
|
|||
TAGS=( "${TAGS[@]/$tag_to_del}" )
|
||||
done
|
||||
|
||||
# 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 that allows upgrading to 4.4.5.
|
||||
# 4.5.X versions uses the previous 4.4.Y as a base we emulate
|
||||
# that we are the last 4.4.Y version that allows upgrading to 4.5.X
|
||||
# We add that version, if available.
|
||||
if [[ "${CUR_SEMVER[0]}" = 4 && "${CUR_SEMVER[1]}" = 5 && "${CUR_SEMVER[2]}" = 0 ]]; then
|
||||
[[ $(git tag -l "v4.4.8") ]] && TAGS+=( "v4.4.8" )
|
||||
[[ $(git tag -l "e4.4.8") ]] && TAGS+=( "e4.4.8" )
|
||||
maybe_add_tag() {
|
||||
local tag="$1"
|
||||
if [[ $(git tag -l "$tag") ]]; then
|
||||
TAGS+=( "$tag" )
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ "${CUR_SEMVER[0]}" = 4 && "${CUR_SEMVER[1]}" = 5 ]]; then
|
||||
for tag in "v4.4.8" "e4.4.8"; do
|
||||
maybe_add_tag "$tag"
|
||||
done
|
||||
fi
|
||||
|
||||
for tag in "${TAGS[@]}"; do
|
||||
|
|
Loading…
Reference in New Issue