Merge pull request #9623 from link108/fix-get-helm-scripts

Fix install scripts, hardcode latest/last v2 release
pull/9746/head
Martin Hickey 4 years ago committed by GitHub
commit f2fc466d88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -76,14 +76,8 @@ verifySupported() {
# checkDesiredVersion checks if the desired version is available.
checkDesiredVersion() {
if [ "x$DESIRED_VERSION" == "x" ]; then
# Get tag from release URL
local release_url="https://github.com/helm/helm/releases"
if type "curl" > /dev/null; then
TAG=$(curl -Ls $release_url | grep 'href="/helm/helm/releases/tag/v2.[0-9]*.[0-9]*\"' | grep -v no-underline | head -n 1 | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}' | awk 'a !~ $0{print}; {a=$0}')
elif type "wget" > /dev/null; then
TAG=$(wget $release_url -O - 2>&1 | grep 'href="/helm/helm/releases/tag/v2.[0-9]*.[0-9]*\"' | grep -v no-underline | head -n 1 | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}' | awk 'a !~ $0{print}; {a=$0}')
fi
# Pinning tag to v2.17.0 as per https://github.com/helm/helm/issues/9607
TAG=v2.17.0
else
TAG=$DESIRED_VERSION
fi

Loading…
Cancel
Save