From 20f760863133c4cca057d1fd26240aee577a6d63 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 20 Aug 2015 09:41:35 -0300 Subject: Adds git hooks for push-to-deploy --- bin/post-receive | 7 +++++++ bin/post-update | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 bin/post-receive create mode 100755 bin/post-update (limited to 'bin') diff --git a/bin/post-receive b/bin/post-receive new file mode 100755 index 0000000..996189d --- /dev/null +++ b/bin/post-receive @@ -0,0 +1,7 @@ +#!/bin/sh + +cd .. +unset GIT_DIR + +git checkout -f +git submodule update --init --recursive diff --git a/bin/post-update b/bin/post-update new file mode 100755 index 0000000..48a6a16 --- /dev/null +++ b/bin/post-update @@ -0,0 +1,16 @@ +#!/bin/sh + +cd .. +unset GIT_DIR + +if [ -d ".git/annex" ]; then + git annex sync +else + git reset HEAD + git checkout -f +fi + +git submodule update --init --recursive + +cd - +exec git update-server-info -- cgit v1.2.3