Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
how to install spotless git hook (getsentry/sentry-android#128)
- Loading branch information
1 parent
1ac0485
commit 961e4a7
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
# From gist at https://gist.github.com/chadmaughan/5889802 | ||
|
||
echo '[git hook] executing gradle spotlessCheck before commit' | ||
|
||
# run the spotlessCheck with the gradle wrapper | ||
./gradlew spotlessCheck --daemon | ||
|
||
# store the last exit code in a variable | ||
RESULT=$? | ||
|
||
# return the './gradlew spotlessCheck' exit code | ||
exit $RESULT |