ansible/roles/git/hooks/files/post-receive-chained-forks
Todd Zullinger c45689142e git/hooks: remove fedmsg_hook from post-receive-chained-forks
The fedmsg_hook no longer exists.  It was removed from the non-fork
post-receive-chained hook in 9875b043d ("Drop the fedmsg_hook since it
no longer exists", 2018-05-03).

Fixes the following warning when pushing to a fork:

    remote: sh: /usr/lib/python2.7/site-packages/pagure/hooks/files/fedmsg_hook.py: No such file or directory

Signed-off-by: Todd Zullinger <tmz@pobox.com>
2018-05-25 11:39:24 -04:00

34 lines
1,017 B
Bash
Executable file

#!/bin/bash
# Redirect stdin to each of the post-receive hooks in place.
# You need to explicitly add your hook to the following list
# for it to be invoked.
pee \
/usr/lib/python2.7/site-packages/pagure/hooks/files/default_hook.py \
/usr/lib/python2.7/site-packages/pagure/hooks/files/pagure_hook.py \
"/usr/bin/grok-manifest -m /srv/git/grokmirror/manifest.js.gz -t /srv/git/repositories/ -n `pwd`"
# We used to send emails directly from the git hook here, but now we send to
# fedmsg which routes to FMN which routes to packagers and the mailing list.
#$GIT_DIR/hooks/post-receive-chained.d/post-receive-email \
# Mechanism to support pagure's hook as well
hookname=`basename $0`
FILE=`mktemp`
trap 'rm -f $FILE' EXIT
cat - > $FILE
for hook in $GIT_DIR/hooks/$hookname.*
do
if test -x "$hook"; then
cat $FILE | $hook "$@"
status=$?
if test $status -ne 0; then
echo Hook $hook failed with error code $status
exit $status
fi
fi
done