Last active
August 29, 2015 14:22
-
-
Save jpotts18/9da5b16df70a5fea25db to your computer and use it in GitHub Desktop.
Android Continuous Integration
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
deployment: | |
alpha: | |
branch: alpha | |
commands: | |
- ./gradlew assembleDebug | |
- ./upload_to_hockeyapp.sh alpha | |
beta: | |
branch: master | |
commands: | |
- ./gradlew assembleDebug | |
- ./upload_to_hockeyapp.sh beta |
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 | |
APP_TOKEN="Your Token" | |
LOG_DATA=$(git log --pretty=format:"%h - %an, %ar : %s" | tail -n 10) | |
echo "ENVIRONMENT = $1" | |
echo "TOKEN = $APP_TOKEN" | |
if [ "$1" = "beta" ] | |
then | |
curl \ | |
-F "status=0" \ | |
-F "notify=1" \ | |
-F "notes=$LOG_DATA" \ | |
-F "notes_type=0" \ | |
-F "ipa=@app/build/outputs/apk/app-debug.apk" \ | |
-H "X-HockeyAppToken: $APP_TOKEN" \ | |
https://rink.hockeyapp.net/api/2/apps/upload | |
else | |
curl \ | |
-F "status=2" \ | |
-F "notify=0" \ | |
-F "notes=$LOG_DATA" \ | |
-F "notes_type=0" \ | |
-F "ipa=@app/build/outputs/apk/app-debug.apk" \ | |
-H "X-HockeyAppToken: $APP_TOKEN" \ | |
https://rink.hockeyapp.net/api/2/apps/upload | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment