Created
April 6, 2017 03:35
-
-
Save mattimustang/58c72e2f730ba3a2630ee7a60e58c40a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
FEATURE="$1" | |
if [ -z ${FEATURE} ]; then | |
echo "usage: $0 <feature branch>" >&2 | |
exit 2 | |
fi | |
git checkout develop | |
if [ $? -ne 0 ]; then | |
exit 1 | |
fi | |
git merge --no-ff ${FEATURE} | |
if [ $? -ne 0 ]; then | |
exit 1 | |
fi | |
git push origin develop | |
if [ $? -ne 0 ]; then | |
exit 1 | |
fi | |
git checkout master | |
if [ $? -ne 0 ]; then | |
exit 1 | |
fi | |
git merge --no-ff develop | |
if [ $? -ne 0 ]; then | |
exit 1 | |
fi | |
git push origin master | |
if [ $? -ne 0 ]; then | |
exit 1 | |
fi | |
git branch -d ${FEATURE} | |
if [ $? -ne 0 ]; then | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment