Merge branch 'master' into single-order-patches

This commit is contained in:
Rohan Mitchell
2015-05-08 12:42:56 +10:00
6 changed files with 26 additions and 10 deletions

View File

@@ -1,4 +1,3 @@
[![Build status](https://badge.buildkite.com/e18473fffac95ed2735ca75700673bd301cac5cffc64de821a.svg?branch=master)](https://buildkite.com/open-food-foundation/open-food-network)
[![Code Climate](https://codeclimate.com/github/openfoodfoundation/openfoodnetwork.png)](https://codeclimate.com/github/openfoodfoundation/openfoodnetwork)
# Open Food Network

View File

@@ -12,6 +12,13 @@ function exit_unless_master_merged {
fi
}
function succeed_if_master_merged {
if [[ `git branch -a --merged origin/$BUILDKITE_BRANCH` == *origin/master* ]]; then
echo "This branch already has the current master merged."
exit 0
fi
}
function drop_and_recreate_database {
# Adapted from: http://stackoverflow.com/questions/12924466/capistrano-with-postgresql-error-database-is-being-accessed-by-other-users
psql -U openfoodweb postgres <<EOF

View File

@@ -1,6 +1,6 @@
#!/bin/bash
set -e
set -ex
source ./script/ci/includes.sh
echo "--- Verifying branch is based on current master"

View File

@@ -0,0 +1,14 @@
#!/bin/bash
set -e
source ./script/ci/includes.sh
echo "--- Checking if master has already been merged"
succeed_if_master_merged
echo "--- Merging master into this branch"
git checkout $BUILDKITE_BRANCH
git merge origin/$BUILDKITE_BRANCH
git merge origin/master -m "Auto-merge from CI [skip ci]"
git push origin $BUILDKITE_BRANCH
git checkout origin/$BUILDKITE_BRANCH

View File

@@ -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" ]]

View File

@@ -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" ]]