From: Neil Muller Date: Sat, 21 Mar 2020 18:51:36 +0000 (+0200) Subject: Update README. Add check-deploy script and placeholder post-receive X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=a781c740bd0cf1458082dd6da6b962c57c1d3bea;p=gitolite-hooks.git Update README. Add check-deploy script and placeholder post-receive --- diff --git a/README.md b/README.md index feeed2f..387a507 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ CTPUG gitolite hooks This repository is to track the various git hooks used by the CTPUG git infrastructure. +We don't use the gitolite hooks via admin option, because it requires a less standard +config. + These hooks are not automatically installed / deployed - that requires manual intervention on the actual server. @@ -17,9 +20,16 @@ This handles posting commit messages to IRC via irker. This handles posting commit messages to Slack using the slack webhook interface +### post-receive + +This is the global post-receive hook that dispatches messages to the appropriate +notifiers if the config option is specified. + Scripts ------ ### check-deploy This can be run on the server to report any outdated hooks. + +check-deploy asumes that the hooks repo is checked out on the server to ~/local/gitolite-hooks diff --git a/check-deploy b/check-deploy new file mode 100755 index 0000000..41f2974 --- /dev/null +++ b/check-deploy @@ -0,0 +1,23 @@ +#!/bin/bash + +cd ~/local/gitolite-hooks + +HOOK_DIR=~/.gitolite/hooks + + +git pull + +for x in *; do + if [ "$x" = "check-deploy" ]; then + continue + elif [ "$x" = "README.md" ]; then + continue + fi + if [ ! -f $HOOK_DIR/$x ]; then + echo "$x doesn't exist in hook dir $HOOK_DIR" + continue + fi + if ! cmp $x $HOOK_DIR/$x; then + echo "$x differs from $HOOK_DIR/$x" + fi +done diff --git a/post-receive b/post-receive new file mode 100755 index 0000000..e69de29 diff --git a/slack b/slack old mode 100644 new mode 100755