Skip to content

Commit

Permalink
Merge pull request #239 from dseevr/fix_latest_release_script
Browse files Browse the repository at this point in the history
scripts/get_latest_release.sh: switch to python3-friendly print statement (backwards compatible with python2)
  • Loading branch information
neelimamukiri authored Aug 28, 2017
2 parents 5a2a959 + 87bb33e commit 8ebb2e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/get_latest_release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash

set -euo pipefail

# Check if the user requested a specific build
if [[ "$BUILD_VERSION" != "" ]]; then
if [[ ! -z "${BUILD_VERSION-}" ]]; then
echo $BUILD_VERSION
exit 0
fi
Expand All @@ -13,7 +15,7 @@ if [[ "$releases" != *"browser_download_url"* ]]; then
exit 1
fi

release=$(echo "$releases" | python -c 'import json, sys;print json.load(sys.stdin)["name"]')
release=$(echo "$releases" | python -c 'import json, sys; print(json.load(sys.stdin)["name"])')
echo $release

exit 0

0 comments on commit 8ebb2e2

Please # to comment.