Created
January 31, 2018 10:52
-
-
Save Neoklosch/02f088d0bc502dd36945877a633b17aa to your computer and use it in GitHub Desktop.
This file contains 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 | |
CMD="./gradlew clean test" | |
# Check if we actually have commits to push | |
commits=`git log @{u}..` | |
if [ -z "$commits" ]; then | |
exit 0 | |
fi | |
$CMD | |
RESULT=$? | |
if [ $RESULT -ne 0 ]; then | |
echo "failed $CMD" | |
exit 1 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment