From 53c4c8b5b7f4b18ba3227b6330b08eea2b9cceaf Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 22 Apr 2015 13:16:39 +1000 Subject: [PATCH] Push to staging fails unless master has been merged into current branch --- script/push_to_staging.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/push_to_staging.sh b/script/push_to_staging.sh index c2c176bb2a..75bccd6e09 100755 --- a/script/push_to_staging.sh +++ b/script/push_to_staging.sh @@ -1,6 +1,7 @@ #!/bin/bash set -e +source ./script/includes.sh # Add staging git remote if required ST2_TEST=`git remote | grep -s 'staging2' || true` @@ -8,6 +9,9 @@ if [[ "$ST2_TEST" != *staging2* ]]; then git remote add staging2 openfoodweb@ofn-staging2:apps/openfoodweb/current fi +echo "--- Verifying branch is based on current master" +exit_unless_master_merged + echo "--- Loading baseline data" ssh ofn-staging2 "/home/openfoodweb/apps/openfoodweb/current/script/load_staging_baseline.sh"