Skip to content

Instantly share code, notes, and snippets.

@kikoso
Created August 31, 2019 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kikoso/0a79740c7cde9174ffbafe19caa39306 to your computer and use it in GitHub Desktop.
Save kikoso/0a79740c7cde9174ffbafe19caa39306 to your computer and use it in GitHub Desktop.
#!/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