Files
git-hooks/hooks/post-receive
Joel Brobecker 6c66db746b Stop adding gnatpython to the PATH used by the hooks
This makes sure that we no longer force the use of this version
of Python if it happens to be available on the machine where
the hooks are being run. Using gnatpython is no longer desirable
since it does not support Python 3.x.

Change-Id: I0505e455e3319b78502acbc79c359b79ca555b92
TN: U530-006
2021-10-19 13:18:00 -07:00

26 lines
812 B
Bash
Executable File

#! /usr/bin/env bash
#
# The "post-receive" script is run after receive-pack has accepted a pack
# and the repository has been updated. It is passed arguments in through
# stdin in the form:
#
# <oldrev> <newrev> <refname>
#
# For example:
#
# aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
# The following is sourceware-specific. Some of the tools installed
# on that machine are too old, causing some really interesting features
# to be missing (Eg: python's OrderedDict, for instance, or git's %B
# format placeholder). So, local installs of more recent versions have
# been placed in /opt/rh/[...].
for tool in git19 python27
do
if [ -f /opt/rh/$tool/enable ]; then
. /opt/rh/$tool/enable
fi
done
python -u `dirname $0`/post_receive.py "$@"