diff --git a/downloadLatest.sh b/downloadLatest.sh index 9e2af1470..2266bc7e5 100755 --- a/downloadLatest.sh +++ b/downloadLatest.sh @@ -26,8 +26,8 @@ fi # Determine the latest apigeecli version by version number ignoring alpha, beta, and rc versions. if [ "${APIGEECLI_VERSION}" = "" ] ; then - location=$(curl -si https://github.com/apigee/apigeecli/releases/latest | grep location) - APIGEECLI_VERSION="${location##*/}" + APIGEECLI_VERSION="$(curl -si https://api.github.com/repos/apigee/apigeecli/releases/latest | grep tag_name | sed -E 's/.*"([^"]+)".*/\1/')" + APIGEECLI_VERSION="${APIGEECLI_VERSION##*/}" fi LOCAL_ARCH=$(uname -m)