almost finished, need some tests

This commit is contained in:
Bachir Soussi Chiadmi
2015-01-06 00:43:26 +01:00
parent 3a6dd52445
commit 622a90d12c
5 changed files with 114 additions and 6 deletions

18
git-post-reveive Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
#hook/post-receive
#CONFIG
PRODDIR="www"
read oldrev newrev refname
if [ $refname = "refs/heads/prod" ]; then
echo "===== DEPLOYING APP ====="
unset GIT_DIR
cd ~
cd $PRODDIR
git pull --ff-only origin prod
echo $?
echo "====== OK ====="
else
echo "Warning Commit not deployed, please use prod branch"
fi