From 6aa57f1a9da93d51a52ef08ade87e121d0185668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Mon, 7 Jun 2021 01:40:09 +0200 Subject: [PATCH] Use releases/latest url instead api to get lastest artifact --- install-binary.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/install-binary.sh b/install-binary.sh index 7fb33382..f84964d1 100755 --- a/install-binary.sh +++ b/install-binary.sh @@ -73,13 +73,7 @@ getDownloadURL() { if [ -n "$version" ]; then DOWNLOAD_URL="https://github.com/$PROJECT_GH/releases/download/$version/helm-diff-$OS.tgz" else - # Use the GitHub API to find the download url for this project. - url="https://api.github.com/repos/$PROJECT_GH/releases/latest" - if type "curl" >/dev/null; then - DOWNLOAD_URL=$(curl -s $url | grep $OS | awk '/\"browser_download_url\":/{gsub( /[,\"]/,"", $2); print $2}') - elif type "wget" >/dev/null; then - DOWNLOAD_URL=$(wget -q -O - $url | grep $OS | awk '/\"browser_download_url\":/{gsub( /[,\"]/,"", $2); print $2}') - fi + DOWNLOAD_URL="https://github.com/$PROJECT_GH/releases/latest/download/helm-diff-$OS.tgz" fi }