Created
August 31, 2019 05:07
-
-
Save kikoso/0a79740c7cde9174ffbafe19caa39306 to your computer and use it in GitHub Desktop.
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/sh | |
echo "Running detekt" | |
./gradlew detektCheck | |
result=$? | |
if [ "$result" = 0 ] ; then | |
echo "Detekt found no problems" | |
exit 0 | |
else | |
echo | |
"Problems found, files will not be committed." | |
exit 1 | |
fi | |
echo "Executing tests before commit" | |
./gradlew clean test | |
result=$? | |
if [ "$result" = 0 ]; then | |
echo "Failed execution of tests" | |
exit 1 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment