diff --git a/resources/uk/gov/hmcts/helm/check-deprecated-charts.sh b/resources/uk/gov/hmcts/helm/check-deprecated-charts.sh index aace4aa706..37778b4eac 100755 --- a/resources/uk/gov/hmcts/helm/check-deprecated-charts.sh +++ b/resources/uk/gov/hmcts/helm/check-deprecated-charts.sh @@ -9,7 +9,10 @@ function ver { printf "%03d%03d%03d%03d" $(echo "$1" | tr '.' ' '); } CURRENT_VERSION=$(helm dependency ls charts/${CHART_DIRECTORY}/ | grep "^${DEPRECATED_CHART_NAME}" |awk '{ print $2}' | sed "s/~//g") -if [[ -n $CURRENT_VERSION ]] && [ $(ver $CURRENT_VERSION) -lt $(ver ${DEPRECATED_CHART_VERSION}) ]; then - echo "$deprecation chart $CURRENT_VERSION is deprecated, please upgrade to at least ${DEPRECATED_CHART_VERSION}" - exit 1 +# Only run deprecation checks on non beta/alpha chart versions +if [[ ! $CURRENT_VERSION =~ (alpha|beta) ]]; then + if [[ -n $CURRENT_VERSION ]] && [ $(ver $CURRENT_VERSION) -lt $(ver ${DEPRECATED_CHART_VERSION}) ]; then + echo "$deprecation chart $CURRENT_VERSION is deprecated, please upgrade to at least ${DEPRECATED_CHART_VERSION}" + exit 1 + fi fi