mirror of
https://github.com/bolucat/Archive.git
synced 2025-12-24 13:28:37 +08:00
15 lines
202 B
Bash
15 lines
202 B
Bash
#!/bin/bash
|
|
|
|
git stash -q --keep-index
|
|
|
|
echo "Running git pre-commit hook"
|
|
|
|
./gradlew ktlint
|
|
|
|
RESULT=$?
|
|
|
|
git stash pop -q
|
|
|
|
# return 1 exit code if running checks fails
|
|
[ $RESULT -ne 0 ] && exit 1
|
|
exit 0 |