add precommit hook
This commit is contained in:
parent
f870853630
commit
ebefd8f955
2 changed files with 17 additions and 0 deletions
14
buildscripts/pre-commit
Executable file
14
buildscripts/pre-commit
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "running cargo check..."
|
||||
|
||||
./check-all.sh
|
||||
STATUS=$?
|
||||
|
||||
if [ $STATUS -ne 0 ]; then
|
||||
echo "cargo check failed, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "cargo check passed"
|
||||
exit 0
|
||||
3
setup-hook.sh
Executable file
3
setup-hook.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
cp buildscripts/pre-commit .git/hooks/
|
||||
Loading…
Add table
Add a link
Reference in a new issue