chiark
/
gitweb
/
~ianmdlvl
/
fdroidserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05a7a87
)
Add ruby tests to the pre-commit hook
author
Daniel Martí
<mvdan@mvdan.cc>
Fri, 12 Dec 2014 11:34:28 +0000
(12:34 +0100)
committer
Daniel Martí
<mvdan@mvdan.cc>
Fri, 12 Dec 2014 11:34:28 +0000
(12:34 +0100)
hooks/pre-commit
patch
|
blob
|
history
diff --git
a/hooks/pre-commit
b/hooks/pre-commit
index e4457023e35d24ce4482db1d9aa120aeb236ae86..564f5a4fb7e311a95e7d57379b719bd7e1868d48 100755
(executable)
--- a/
hooks/pre-commit
+++ b/
hooks/pre-commit
@@
-8,6
+8,7
@@
exec 1>&2
PY_FILES="fdroid makebuildserver setup.py examples/*.py buildserver/*.py fdroidserver/*.py"
SH_FILES="fd-commit jenkins-build docs/*.sh hooks/pre-commit"
+RB_FILES="buildserver/cookbooks/*/recipes/*.rb"
err() {
echo ERROR: "$@"
@@
-55,4
+56,12
@@
for f in $SH_FILES; do
fi
done
+# check the syntax of included ruby scripts with ruby -c
+
+for f in $RB_FILES; do
+ if ! ruby -c $f 1>/dev/null; then
+ err "ruby tests failed!"
+ fi
+done
+
exit 0