Don't deploy when on branches other than master

This commit is contained in:
Ariejan de Vroom 2015-04-07 15:53:35 +02:00
parent ecdffa8ec5
commit ae506afc7b

View File

@ -3,6 +3,11 @@
source=public/ source=public/
target=apps@spock.ariejan.net:/home/apps/sites/ariejan.net target=apps@spock.ariejan.net:/home/apps/sites/ariejan.net
if [ ! `git symbolic-ref HEAD | grep -q "refs/heads/master"` ] ; then
echo "You are not on the 'master' branch. Not deploying."
exit
fi
if [ -d ./public ] ; then if [ -d ./public ] ; then
echo "-- Pruning current static files from ./${source}" echo "-- Pruning current static files from ./${source}"
rm -rf ./${source} rm -rf ./${source}