Skip to content
Snippets Groups Projects
Commit 7d0a5e96 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

a script which automates the process of merging the latest outstanding train into production

parent c33e79e8
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# merge the latest outstanding train into production and create
# a tag.
# get up to date!
echo "Getting up to date:"
get 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 prod
git merge --no-ff remotes/origin/train-$TRAIN -m "integrating 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"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment