From a93ea9370f05f749f99f06964f500fd9439416ab Mon Sep 17 00:00:00 2001 From: holtwilkins <5665043+holtwilkins@users.noreply.github.com> Date: Thu, 7 Oct 2021 10:14:49 +1100 Subject: [PATCH] Support jq 1.5 (#125) --- bouncerw | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bouncerw b/bouncerw index 90c56216..cb56cacc 100755 --- a/bouncerw +++ b/bouncerw @@ -34,9 +34,7 @@ unlock() { download() { if [ "${BOUNCER_VERSION}" == "" ]; then echo "BOUNCER_VERSION is not set. Looking for the latest bouncer release..." - # Terraform Enterprise environment doesn't have jq, replace with this once it does: - # export BOUNCER_VERSION=$(curl -s "https://api.bintray.com/packages/palantir/releases/bouncer" | jq -r '.latest_version') - BOUNCER_VERSION=$(curl -s https://api.github.com/repos/palantir/bouncer/releases/latest | jq | grep "tag_name" | sed 's/.\(.*\)/\1/' | sed 's/\(.*\)./\1/' | tr -d '"' | sed "s/.*v//") + BOUNCER_VERSION=$(curl -s https://api.github.com/repos/palantir/bouncer/releases/latest | jq -r '.' | grep "tag_name" | sed 's/.\(.*\)/\1/' | sed 's/\(.*\)./\1/' | tr -d '"' | sed "s/.*v//") export BOUNCER_VERSION fi # Strip a leading 'v' if someone adds one, or one winds-up there somehow