gitbarrerepo.sh fix

This commit is contained in:
Bachir Soussi Chiadmi
2018-04-07 17:18:51 +02:00
parent 3c238f0e4d
commit 930616c71d
2 changed files with 5 additions and 5 deletions

20
assets/git-post-receive Normal file
View File

@@ -0,0 +1,20 @@
#!/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
# run deploy script instead
. deploy.sh
echo $?
echo "====== OK ====="
else
echo "Warning Commit not deployed, please use prod branch"
fi