|
|
@ -76,14 +76,8 @@ verifySupported() {
|
|
|
|
# checkDesiredVersion checks if the desired version is available.
|
|
|
|
# checkDesiredVersion checks if the desired version is available.
|
|
|
|
checkDesiredVersion() {
|
|
|
|
checkDesiredVersion() {
|
|
|
|
if [ "x$DESIRED_VERSION" == "x" ]; then
|
|
|
|
if [ "x$DESIRED_VERSION" == "x" ]; then
|
|
|
|
# Get tag from release URL
|
|
|
|
# Pinning tag to v2.17.0 as per https://github.com/helm/helm/issues/9607
|
|
|
|
local release_url="https://github.com/helm/helm/releases"
|
|
|
|
TAG=v2.17.0
|
|
|
|
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
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
TAG=$DESIRED_VERSION
|
|
|
|
TAG=$DESIRED_VERSION
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|