I have multiple post-receive hooks set up as
option hook.pre-receive.foo = foo
option hook.pre-receive.bar = bar
if foo fails (exits with status 1), gitolite will continue running bar
this seems to stem from the way multi-hook-driver is written. by checking the exit code after every script runs, I can make gitolite fail after foo fails
for h in $0.*; do
[ -x $h ] || continue
if [ $type = args ]
then
$h $@
rc=$?
[ $0 = hooks/pre-receive ] && [ $rc != 0 ] && exit $rc || true
else
echo "$stdin" | $h
rc=$?
[ $0 = hooks/pre-receive ] && [ $rc != 0 ] && exit $rc || true
fi
done
* altenatively to "|| true", one could also append "exit 0" at the end of the multi-hook-driver
--
You received this message because you are subscribed to the Google Groups "gitolite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitolite+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> >> To unsubscribe from this group and stop receiving emails from it, send an email to gito...@googlegroups.com.