commit 55eb840679359e06b5e9ecffa7e842954b48c6fc
parent 80ac2b175e49fec4861fad7a05e61c6db592e64c
Author: Michael Savage <mikejsavage@gmail.com>
Date: Sun, 16 Sep 2018 14:23:58 +0300
Add post-receive hook here
Diffstat:
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/conf/gitolite.conf b/conf/gitolite.conf
@@ -1,3 +1,5 @@
+LOCAL_CODE => "$rc{GL_ADMIN_BASE}"
+
repo gitolite-admin
RW+ = mike
@@ -5,11 +7,13 @@ repo medfall
RW+ = mike
RW+ = mike-windows
R = daemon
+ option hook.post-receive = stagit
repo mudgangster
RW+ = mike
RW+ = mike-windows
R = daemon
+ option hook.post-receive = stagit
repo dotfiles
RW+ = mike
@@ -20,3 +24,4 @@ repo dotfiles
repo umbra
RW+ = mike
R = daemon
+ option hook.post-receive = stagit
diff --git a/hooks/common/stagit b/hooks/common/stagit
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+reponame="$(basename "$(pwd)" .git)"
+
+cd "/var/www/git/$reponame"
+stagit "/var/git/repositories/$reponame.git/" -c .htmlcache
+stagit-index /var/git/repositories/medfall.git /var/git/repositories/mudgangster.git /var/git/repositories/umbra.git > /var/www/git/index.html
+find . -type f -print0 | xargs -0 chmod 644
+find . -type d -print0 | xargs -0 chmod 755
+