Skip to content

Commit

Permalink
Latest version comes as one version, not an array
Browse files Browse the repository at this point in the history
  • Loading branch information
neelimamukiri committed Apr 15, 2017
1 parent 4efa3a1 commit 388ee70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/get_latest_release.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash

# Check if the user requested a specific build
if [[ "$BUILD_VERSION" != "" ]]; then
echo $BUILD_VERSION
Expand All @@ -13,6 +12,8 @@ if [[ "$releases" != *"browser_download_url"* ]]; then
if [[ "$releases" != *"browser_download_url"* ]]; then
exit 1
fi
release=$(echo "$releases" | python -c 'import json, sys;print json.load(sys.stdin)[0]["name"]')
else
release=$(echo "$releases" | python -c 'import json, sys;print json.load(sys.stdin)["name"]')
fi
release=$(echo "$releases" | python -c 'import json, sys;print json.load(sys.stdin)[0]["name"]')
echo $release

0 comments on commit 388ee70

Please sign in to comment.