mirror of
https://github.com/izzy2lost/MGit.git
synced 2026-03-10 12:32:58 -07:00
19 lines
520 B
Bash
Executable File
19 lines
520 B
Bash
Executable File
#!/bin/sh
|
|
# this hook is in SCM so that it can be shared
|
|
# to install it, create a symbolic link in the projects .git/hooks folder
|
|
#
|
|
# i.e. - from the .git/hooks directory, run
|
|
# $ ln -s ../../git-hooks/pre-commit.sh pre-commit
|
|
#
|
|
# to skip the tests, run with the --no-verify argument
|
|
# i.e. - $ 'git commit --no-verify'
|
|
|
|
# run the tests with the gradle wrapper
|
|
./gradlew lintKotlin test
|
|
|
|
# store the last exit code in a variable
|
|
RESULT=$?
|
|
|
|
# return the './gradlew test' exit code
|
|
exit $RESULT
|