Skip to content

Instantly share code, notes, and snippets.

@jpotts18
Last active August 29, 2015 14:22
Show Gist options
  • Save jpotts18/9da5b16df70a5fea25db to your computer and use it in GitHub Desktop.
Save jpotts18/9da5b16df70a5fea25db to your computer and use it in GitHub Desktop.
Android Continuous Integration
deployment:
alpha:
branch: alpha
commands:
- ./gradlew assembleDebug
- ./upload_to_hockeyapp.sh alpha
beta:
branch: master
commands:
- ./gradlew assembleDebug
- ./upload_to_hockeyapp.sh beta
#!/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