Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 7f54c9df51
Fetching contributors…

Cannot retrieve contributors at this time

executable file 34 lines (24 sloc) 1.05 KB
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
# merge the latest outstanding train into production and create
# a tag.
# get up to date!
echo "Getting up to date:"
git fetch origin
# first, let's identify the train
TRAIN=`git branch -a | grep remotes/origin/train | sed -e 's/^.*train-\(.*\)$/\1/' | sort -n | tail -1`
echo "Merging train ($TRAIN) into production"
git checkout -B prod remotes/origin/prod
git merge --no-ff remotes/origin/train-$TRAIN -m "integrating train $TRAIN"
# now delete the local train branch if it exists
LOCAL_TRAIN_BRANCH=`git branch | fgrep train-$TRAIN`
if [ "x${LOCAL_TRAIN_BRANCH}" == "xtrain-${TRAIN}" ] ; then
echo "deleting local branch: train-$TRAIN"
git branch -D train-$TRAIN
git tag train-$TRAIN
echo "All done! Now you should delete the remote train, and push your changes"
echo "git push origin :train-$TRAIN"
echo "git push --tags origin prod"
Jump to Line
Something went wrong with that request. Please try again.