Created
November 25, 2016 09:32
-
-
Save hoombar/9fe67acc582d47335c156630b18f2526 to your computer and use it in GitHub Desktop.
This is just a quick script to review changes on another branch. The current project does not have any CI and many hours are spent reviewing pull requests from more junior developers and checking they build and meet the expected criteria. This just speeds up that process
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 | |
### | |
# Usage: | |
# Suggested cloning another copy of the repo to project-review folder | |
# ./review.sh branch_name | |
# Note that the branch name should not have any spaces | |
# This script assumes that you have only one emulator/device connected over ADB | |
### | |
echo "Grabbing repo" | |
git fetch | |
git checkout "$1" | |
# in case we're already on the branch, but not up to date | |
git pull | |
echo "Building" | |
# build all variants, just in case they have missed something in one build flavor | |
./gradlew assembleDebug | |
echo "Deploying" | |
adb install -r ./app/build/outputs/apk/app-dev-debug.apk | |
echo "Launching" | |
adb shell am start -a android.intent.action.MAIN -n com.mypackage.myapp/.MainActivity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment