gonito/helpers/gitolite/post-update

25 lines
551 B
Plaintext
Raw Permalink Normal View History

2022-01-15 16:52:06 +01:00
#!/bin/zsh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
BRANCH_SPEC=$1
if [[ "$BRANCH_SPEC" == refs/heads/* ]]
then
BRANCH=${BRANCH_SPEC#refs/heads/}
if [[ "$GL_REPO" =~ '^([^/]+)/([^/]+)$' ]]
then
echo $BRANCH
USERID=$match[1]
CHALLENGE=$match[2]
wget --timeout=0 --quiet -O - --post-data "challenge=${CHALLENGE}&branch=${BRANCH}&user=${USERID}" https://gonito.net/trigger-locally
fi
fi
#exec git update-server-info