diff --git a/control-plane/build-support/scripts/consul-enterprise-version.sh b/control-plane/build-support/scripts/consul-enterprise-version.sh index d0a1a40b53..d910f428ab 100755 --- a/control-plane/build-support/scripts/consul-enterprise-version.sh +++ b/control-plane/build-support/scripts/consul-enterprise-version.sh @@ -4,11 +4,11 @@ FILE=$1 VERSION=$(yq .global.image $FILE) -if [[ !"${VERSION}" == *"hashicorp/consul:"* ]]; then +if [[ "${VERSION}" == *"hashicorp/consul:"* ]]; then + # for matching release image repos with a -ent label VERSION=$(echo ${VERSION} | sed "s/consul:/consul-enterprise:/g" | sed "s/$/-ent/g") -elif [[ !"${VERSION}" == *"-rc"* ]]; then - VERSION=$(echo ${VERSION} | sed "s/consul:/consul-enterprise:/g" | sed "s/$/-ent/g") else + # for matching preview image repos VERSION=$(echo ${VERSION} | sed "s/consul:/consul-enterprise:/g") fi