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

17 lines
333 B
Bash

#!/bin/bash
#hook/pre-receive
#CONFIG
PRODDIR="www"
read oldrev newrev refname
if [ $refname = "refs/heads/prod" ]; then
echo "===== UPDATE REPOSITORY ====="
unset GIT_DIR
cd ~
cd $PRODDIR
git add .
git commit -m "Auto Commit"
echo "====== OK ====="
else
echo "Warning Commit not deployed, please use prod branch"
fi