Skip to content

Instantly share code, notes, and snippets.

@philographer
Last active April 14, 2017 06:27
Show Gist options
  • Save philographer/fe7d042464456b34432700601cacd3e9 to your computer and use it in GitHub Desktop.
Save philographer/fe7d042464456b34432700601cacd3e9 to your computer and use it in GitHub Desktop.
Android Build Hook

Android Build Hook Shell

#!/bin/bash

LOG_PATH= # Need to fill
APK_PATH= # Need to fill

# Delete APK File
rm -rf $APK_PATH
# Delete Log File
rm -rf $LOG_PATH
# Git Reset And Pull
git reset --hard HEAD^ > $LOG_PATH 2>&1
git pull origin master > $LOG_PATH 2>&1
gradle assembleDebug >> $LOG_PATH  2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment