diff --git a/script/ci/push_to_production.sh b/script/ci/push_to_production.sh index 1666368e08..00ade0af07 100755 --- a/script/ci/push_to_production.sh +++ b/script/ci/push_to_production.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -e +set -ex # Add production git remote if required PROD_TEST=`git remote | grep -s 'production' || true` @@ -12,6 +12,4 @@ echo "--- Saving baseline data for staging" ssh ofn-staging2 "/home/openfoodweb/apps/openfoodweb/current/script/ci/save_staging_baseline.sh $BUILDKITE_COMMIT" echo "--- Pushing to production" -output=$(git push production $BUILDKITE_COMMIT:master --force 2>&1) -echo "$output" -[[ $output =~ "Done" ]] +[[ $(git push production $BUILDKITE_COMMIT:master --force 2>&1) =~ "Done" ]] diff --git a/script/ci/push_to_staging.sh b/script/ci/push_to_staging.sh index a38cda0c1b..c634ca53a4 100755 --- a/script/ci/push_to_staging.sh +++ b/script/ci/push_to_staging.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -e +set -ex source ./script/ci/includes.sh # Add staging git remote if required @@ -16,6 +16,4 @@ echo "--- Loading baseline data" ssh ofn-staging2 "/home/openfoodweb/apps/openfoodweb/current/script/ci/load_staging_baseline.sh" echo "--- Pushing to staging" -output=$(git push staging2 $BUILDKITE_COMMIT:master --force 2>&1) -echo "$output" -[[ $output =~ "Done" ]] +[[ $(git push staging2 $BUILDKITE_COMMIT:master --force 2>&1) =~ "Done" ]]