mirror of
https://github.com/f-droid/fdroidserver.git
synced 2026-03-24 09:51:22 -04:00
Add ruby tests to the pre-commit hook
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user