mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
Add ruby tests to the pre-commit hook
This commit is contained in:
parent
05a7a872b6
commit
5e15d8ff47
1 changed files with 9 additions and 0 deletions
|
@ -8,6 +8,7 @@ exec 1>&2
|
||||||
|
|
||||||
PY_FILES="fdroid makebuildserver setup.py examples/*.py buildserver/*.py fdroidserver/*.py"
|
PY_FILES="fdroid makebuildserver setup.py examples/*.py buildserver/*.py fdroidserver/*.py"
|
||||||
SH_FILES="fd-commit jenkins-build docs/*.sh hooks/pre-commit"
|
SH_FILES="fd-commit jenkins-build docs/*.sh hooks/pre-commit"
|
||||||
|
RB_FILES="buildserver/cookbooks/*/recipes/*.rb"
|
||||||
|
|
||||||
err() {
|
err() {
|
||||||
echo ERROR: "$@"
|
echo ERROR: "$@"
|
||||||
|
@ -55,4 +56,12 @@ for f in $SH_FILES; do
|
||||||
fi
|
fi
|
||||||
done
|
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
|
exit 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue