From 1a7dfdb9eda8eabb44ff777ed78db51578654180 Mon Sep 17 00:00:00 2001 From: Daniel Grimm Date: Fri, 21 Nov 2025 16:04:51 +0100 Subject: [PATCH] fix: pin helm to v3 We don't yet support helm v4 (see #1371). Signed-off-by: Daniel Grimm --- tools/update_deps.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/update_deps.sh b/tools/update_deps.sh index fdcb8f66a..b5c8cb9d3 100755 --- a/tools/update_deps.sh +++ b/tools/update_deps.sh @@ -36,6 +36,13 @@ function getLatestVersion() { curl -sL "https://api.github.com/repos/${1}/releases/latest" | yq '.tag_name' } +# getLatestMinorVersion gets the latest released version of a github project with a specific minor version prefix +# $1 = org/repo +# $2 = major version prefix +function getLatestMinorVersion() { + curl -sL "https://api.github.com/repos/${1}/releases" | yq -p json "[.[] | select(.tag_name | test(\"^$2\\.\")) | .tag_name] | .[0]" +} + function getReleaseBranch() { minor=$(echo "${1}" | cut -f1,2 -d'.') echo "release-${minor#*v}" @@ -64,8 +71,8 @@ OPERATOR_SDK_LATEST_VERSION=$(getLatestVersion operator-framework/operator-sdk) "$SED_CMD" -i "s|OPERATOR_SDK_VERSION ?= .*|OPERATOR_SDK_VERSION ?= ${OPERATOR_SDK_LATEST_VERSION}|" "${ROOTDIR}/Makefile.core.mk" find "${ROOTDIR}/chart/templates/olm/scorecard.yaml" -type f -exec "$SED_CMD" -i "s|quay.io/operator-framework/scorecard-test:.*|quay.io/operator-framework/scorecard-test:${OPERATOR_SDK_LATEST_VERSION}|" {} + -# Update helm -HELM_LATEST_VERSION=$(getLatestVersion helm/helm | cut -d/ -f2) +# Update helm (FIXME: pinned to v3 as we don't support helm4 yet, see https://github.com/istio-ecosystem/sail-operator/issues/1371) +HELM_LATEST_VERSION=$(getLatestMinorVersion helm/helm v3) "$SED_CMD" -i "s|HELM_VERSION ?= .*|HELM_VERSION ?= ${HELM_LATEST_VERSION}|" "${ROOTDIR}/Makefile.core.mk" # Update controller-tools