[sysadmin-bin: 9/168] Add a standard GNOME post-receive hook



commit 1ff3236ce5ae34c99d3262182b70fbc37afa99ac
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Thu Feb 5 16:39:18 2009 -0500

    Add a standard GNOME post-receive hook
    
    Add a standard post-receive hook that (for now)
     - runs log-push to log the refs push
     - run a slightly modified version of the git contrib email script

 gnome-post-receive |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/gnome-post-receive b/gnome-post-receive
new file mode 100755
index 0000000..5d4f371
--- /dev/null
+++ b/gnome-post-receive
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# Standard GNOME post-receive hook.
+#
+# 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
+#
+# git-config options affecting the operation of this script:
+# hook.emailprefix  - should always be empty
+# hooks.mailinglist - should always be svn-commits-list gnome org
+
+BINDIR=/home/admin/gitadmin-bin
+
+# If the committing user has a homedir with a .gitconfig in it, it we
+# don't want that to affect our operation. (Should this just be handled
+# in run-git-or-special-cmd?)
+GIT_DIR=$(git rev-parse --git-dir 2>/dev/null)
+GIT_CONFIG="${GIT_DIR}/config"
+export GIT_CONFIG
+
+tee >($BINDIR/log-push) \
+    | $BINDIR/post-receive-email



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]