Skip to content

Commit

Permalink
Support jq 1.5 (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtwilkins authored Oct 6, 2021
1 parent f088eff commit a93ea93
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bouncerw
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a93ea93

Please sign in to comment.