]> git.droids-corp.org - git-central.git/commitdiff
post-receive-delivery: add a deliver command master
authorOlivier Matz <zer0@droids-corp.org>
Tue, 19 Feb 2013 10:05:33 +0000 (11:05 +0100)
committerOlivier Matz <zer0@droids-corp.org>
Tue, 19 Feb 2013 10:24:18 +0000 (11:24 +0100)
Signed-off-by: Olivier Matz <zer0@droids-corp.org>
server/post-receive-delivery

index 4726561d85ba85debb2be1cf980cbf036ce6132a..096ff87c4f9a7f5f7e6cd2e5a7920082582ca1f1 100755 (executable)
@@ -8,7 +8,8 @@
 #
 # This hook clone and pull the repoditory each time a commit is pushed
 # in the tree. Each branch will be delivered in
 #
 # This hook clone and pull the repoditory each time a commit is pushed
 # in the tree. Each branch will be delivered in
-# ${GIT_DELIVER_DIRECTORY}/branch.
+# ${GIT_DELIVER_DIRECTORY}/branch. If ${GIT_DELIVER_COMMAND} is set,
+# this command will be executed in the delivery directory.
 
 
 # ---------------------------- Functions
 
 
 # ---------------------------- Functions
@@ -60,6 +61,11 @@ generate_delivery()
                unset GIT_DIR
                git pull --rebase
        fi
                unset GIT_DIR
                git pull --rebase
        fi
+
+       if [ ! -z "${GIT_DELIVER_COMMAND}" ]; then
+               cd ${dstdir}
+               ${GIT_DELIVER_COMMAND}
+       fi
 }
 
 # ---------------------------- main()
 }
 
 # ---------------------------- main()