From 5c720a01a3858792ecfbc5b207d0a170b19041e6 Mon Sep 17 00:00:00 2001 From: Thales Macedo Garitezi Date: Tue, 16 Aug 2022 16:27:16 -0300 Subject: [PATCH] chore: skip relup while {e,v}4.4.8 does not exist --- build | 5 +++++ scripts/relup-base-vsns.sh | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build b/build index 056394bac..890a9a1ff 100755 --- a/build +++ b/build @@ -188,6 +188,11 @@ 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. + if [[ -z "$(ls -A _upgrade_base 2>/dev/null || true)" && "${PKG_VSN}" == 4.5.0* ]]; then + has_relup='no' + fi if [ "$has_relup" = 'yes' ]; then ./scripts/inject-relup.escript "${tard}/emqx/releases/${PKG_VSN}/relup" fi diff --git a/scripts/relup-base-vsns.sh b/scripts/relup-base-vsns.sh index 8919f9cdf..724f17d1a 100755 --- a/scripts/relup-base-vsns.sh +++ b/scripts/relup-base-vsns.sh @@ -91,9 +91,10 @@ 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. +# We add that version, if available. if [[ "${CUR_SEMVER[0]}" = 4 && "${CUR_SEMVER[1]}" = 5 && "${CUR_SEMVER[2]}" = 0 ]]; then - TAGS+=( "v4.4.8" ) - TAGS+=( "e4.4.8" ) + [[ $(git tag -l "v4.4.8") ]] && TAGS+=( "v4.4.8" ) + [[ $(git tag -l "e4.4.8") ]] && TAGS+=( "e4.4.8" ) fi for tag in "${TAGS[@]}"; do