mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 08:02:15 +03:00
cli: allow setting the release to get in cli/get.sh (#4348)
This commit is contained in:
parent
6d0518bc72
commit
f6d111ccd9
@ -31,10 +31,12 @@ if [ "$?" = "1" ]; then
|
||||
die "You need to install curl to use this script."
|
||||
fi
|
||||
|
||||
log "Getting latest version..."
|
||||
release=${1:-latest}
|
||||
|
||||
log "Getting $release version..."
|
||||
|
||||
# adapted from https://github.com/openfaas/faas-cli/blob/master/get.sh
|
||||
version=$(curl -s -f -H 'Content-Type: text/plain' https://releases.hasura.io/graphql-engine?agent=cli-get.sh)
|
||||
version=`echo $(curl -s -f -H 'Content-Type: application/json' https://releases.hasura.io/graphql-engine?agent=cli-get.sh) | sed -n -e "s/^.*\"$release\":\"\([^\",}]*\)\".*$/\1/p"`
|
||||
if [ ! $version ]; then
|
||||
log "${YELLOW}"
|
||||
log "Failed while attempting to install hasura graphql-engine cli. Please manually install:"
|
||||
@ -138,4 +140,4 @@ if ! $(echo "$PATH" | grep -q "$INSTALL_PATH"); then
|
||||
log
|
||||
log "${YELLOW}$INSTALL_PATH not found in \$PATH, you might need to add it${NC}"
|
||||
log
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user