From ae506afc7b8a68b028baf6c14c218b9bbf22ea1d Mon Sep 17 00:00:00 2001 From: Ariejan de Vroom Date: Tue, 7 Apr 2015 15:53:35 +0200 Subject: [PATCH] Don't deploy when on branches other than master --- deploy.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deploy.sh b/deploy.sh index b2adc3d..b80faca 100755 --- a/deploy.sh +++ b/deploy.sh @@ -3,6 +3,11 @@ source=public/ 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 echo "-- Pruning current static files from ./${source}" rm -rf ./${source}