From ab9cc982a0616e28d6e308d69033534cb7e62025 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Tue, 19 Mar 2019 21:00:12 -0700 Subject: [PATCH] fix(scripts): use a more precise method of grepping Github recently changed the output of the releases page. grepping for the exact tag fixes the issue where the wrong tag was being filtered. Signed-off-by: Matthew Fisher --- scripts/get | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/get b/scripts/get index 9c93e1e84..bc13039e2 100755 --- a/scripts/get +++ b/scripts/get @@ -80,9 +80,9 @@ checkDesiredVersion() { # Use the GitHub releases webpage for the project to find the desired version for this project. local release_url="https://github.com/helm/helm/releases/${DESIRED_VERSION:-latest}" if type "curl" > /dev/null; then - TAG=$(curl -SsL $release_url | awk '/\/tag\//' | 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}') + TAG=$(curl -SsL $release_url | awk '/\/tag\//' | grep -v no-underline | grep " /dev/null; then - TAG=$(wget -q -O - $release_url | awk '/\/tag\//' | 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}') + TAG=$(wget -q -O - $release_url | awk '/\/tag\//' | grep -v no-underline | grep "