Created
April 27, 2017 15:23
-
-
Save QAutomatron/4547bb5a823ee3651efcf7654af06dcf to your computer and use it in GitHub Desktop.
Download apk from hockey app. need jq installed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BUILD=$1 | |
TOKEN=<hockey-app-token> | |
APP=<app-id> | |
VERSION=$(curl \ | |
-H "X-HockeyAppToken: $TOKEN" \ | |
https://rink.hockeyapp.net/api/2/apps/$APP/app_versions \ | |
| jq --arg BUILD "$BUILD" '.app_versions | .[] | select(.version==$BUILD) | .id') | |
curl -L -o $BUILD.apk https://rink.hockeyapp.net/api/2/apps/$APP/app_versions/$VERSION?format=apk | |
echo "!!!DONE!!!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@QAutomatron@AchrafAmil
MY .sh file is not working i have only changed TOKEN & APP value:
#!/bin/bash
BUILD=$1
TOKEN=2e
APP=0*****3
VERSION=$(curl \
-H "X-HockeyAppToken: $TOKEN" \
https://rink.hockeyapp.net/api/2/apps/$APP/app_versions \
| jq --arg BUILD "$BUILD" '.app_versions | .[] | select(.version==$BUILD) | .id')
curl -L -o $BUILD.apk https://rink.hockeyapp.net/api/2/apps/$APP/app_versions/$VERSION?format=apk
echo "!!!DONE!!!"
I am getting below error:
$ bash /cygdrive/d/appDownload.sh
/cygdrive/d/appDownload.sh: command substitution: line 12: syntax error near unexpected token
|' /cygdrive/d/appDownload.sh: command substitution: line 12:
| jq --arg BUILD'"$BUILD" '.app_versions | .[] | select(.version==$BUILD) | .id')/cygdrive/d/appDownload.sh: line 9: curl: command not found
!!!DONE!!!
Could you please help me with this.