Skip to content

Commit

Permalink
Pin latest cli version in godownloader (#1395)
Browse files Browse the repository at this point in the history
* Pin latest cli version in godownloader

* Updating log print
  • Loading branch information
kushalmalani authored and neel-astro committed Oct 11, 2023
1 parent 37ea70c commit a47e5bc
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions godownloader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e
# Code initially generated by godownloader on 2022-01-11T17:25:32Z. Code has been edited to fit our usecase.
#

LATEST_VERSION=v1.19.2
usage() {
this=$1
cat <<EOF
Expand Down Expand Up @@ -93,17 +94,18 @@ version_gte() {
}
tag_to_version() {
if [ -z "${TAG}" ]; then
log_info "checking GitHub for latest tag"
log_info "Using Latest($LATEST_VERSION) version"
TAG="$LATEST_VERSION"
else
log_info "checking GitHub for tag '${TAG}'"
REALTAG=$(github_release "$OWNER/$REPO" "${TAG}") && true
if test -z "$REALTAG"; then
log_crit "unable to find '${TAG}' - see https://github.com/${PREFIX}/releases for details"
exit 1
fi
# if version starts with 'v', remove it
TAG="$REALTAG"
fi
REALTAG=$(github_release "$OWNER/$REPO" "${TAG}") && true
if test -z "$REALTAG"; then
log_crit "unable to find '${TAG}' - use 'latest' or see https://github.com/${PREFIX}/releases for details"
exit 1
fi
# if version starts with 'v', remove it
TAG="$REALTAG"
VERSION=${TAG#v}
}
adjust_format() {
Expand Down

0 comments on commit a47e5bc

Please sign in to comment.