added ikiwikihooks to update wiki
authorLisa Marie Maginnis <lisam@fsf.org>
Thu, 2 Apr 2015 19:38:42 +0000 (15:38 -0400)
committerLisa Marie Maginnis <lisam@fsf.org>
Thu, 2 Apr 2015 19:38:42 +0000 (15:38 -0400)
gluestick.git/post-update

index d73acc5eaa26b17fe5f3fbdbc0ec306453fd79f1..ad3420e0093bfc8649a20d7c72ca5bd8cf0d1643 100755 (executable)
@@ -1,13 +1,16 @@
 #!/bin/bash
 
+# Load password info
+. /home/git/local/etc/gluestick.conf.sh
+
 unset GIT_DIR
 SELF=deploy_hooks.git
 REPO_DIR=$HOME/repositories
 CHECKOUT_DIR=$HOME/local/checkouts/deploy-hooks
 
 case $1 in
-    refs/heads/stable)
-       echo "Updating hooks on vcs.fsf.org..."
+    refs/heads/master)
+       echo "Updating gluestick.office.fsf.org..."
        ;;
     *)
         echo 'No rules for this branch!'
@@ -15,19 +18,7 @@ case $1 in
        ;;
 esac
 
-echo "Updating local checkout..."
-if [ ! -d $CHECKOUT_DIR ]; then
-    git clone $REPO_DIR/$self $CHECKOUT_DIR
-    git checkout stable
-else
-    cd $CHECKOUT_DIR
-    git pull origin stable
-fi
-
-echo "Syncing hooks..."
-for working_copy in $(find $CHECKOUT_DIR -type d -maxdepth 1 -name '*git'); do
-    rsync -avrSPX --delete $working_copy/hooks/* $REPO_DIR/{$working_copy//*\//}/hooks/
-done
+git log -1 --format=format:%ae HEAD | grep -e '@web$' -e 'ikiwiki@' || curl -s --insecure 'https://'$ikiwiki_user':'$ikiwiki_pass'@'$ikiwiki_url'?do=ping'
 
 exec git update-server-info