self-updating post-receive. this is an awful idea

main
Jonathan Dahan 12 months ago
parent 4af558d4ce
commit 947b7f234e

@ -3,8 +3,7 @@ set -e -u -o pipefail
while read oldrev newrev ref
do
if [[ $ref =~ .*/main$ ]];
then
if [[ $ref =~ .*/main$ ]]; then
echo "main ref received"
echo "moving into temporary work tree"; {
@ -23,5 +22,9 @@ do
echo "restarting server"; {
podman-compose restart || podman compose up
}
echo "updating post-receive hook for future runs"; {
cp hooks/post-receive $0
}
fi
done

Loading…
Cancel
Save