debion-web-server/assets/git-post-reveive
Bachir Soussi Chiadmi 13c4dc91eb mainly more echos
2015-03-12 17:57:13 +01:00

18 lines
332 B
Bash

#!/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