Skip to content

Commit 5492efe

Browse files
jkroepkemumoshu
andauthored
Use releases/latest url instead api to get lastest artifact (#285)
Co-authored-by: Yusuke Kuoka <[email protected]>
1 parent 12d7955 commit 5492efe

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

install-binary.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,7 @@ getDownloadURL() {
7979
if [ -n "$version" ]; then
8080
DOWNLOAD_URL="https://github.com/$PROJECT_GH/releases/download/$version/helm-diff-$OS-$ARCH.tgz"
8181
else
82-
# Use the GitHub API to find the download url for this project.
83-
url="https://api.github.com/repos/$PROJECT_GH/releases/latest"
84-
if type "curl" >/dev/null; then
85-
DOWNLOAD_URL=$(curl -s $url | grep $OS | grep $ARCH | awk '/\"browser_download_url\":/{gsub( /[,\"]/,"", $2); print $2}')
86-
elif type "wget" >/dev/null; then
87-
DOWNLOAD_URL=$(wget -q -O - $url | grep $OS | grep $ARCH | awk '/\"browser_download_url\":/{gsub( /[,\"]/,"", $2); print $2}')
88-
fi
82+
DOWNLOAD_URL="https://github.com/$PROJECT_GH/releases/latest/download/helm-diff-$OS-$ARCH.tgz"
8983
fi
9084
}
9185

0 commit comments

Comments
 (0)