Last active
July 10, 2017 21:13
-
-
Save tristanlins/203e3bca25dfe001c9d8 to your computer and use it in GitHub Desktop.
Quick creation of new releases with git flow, without using the release branch.
This file contains hidden or 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/bash | |
TAG=$1 | |
if [[ -z "$TAG" ]]; then | |
echo "No tag specified!" | |
exit 1 | |
fi | |
if [[ -n "$(git status --porcelain)" ]]; then | |
echo "Uncommited changes detected!" | |
git status -s | |
exit 1 | |
fi | |
echo "Release version $TAG" | |
git checkout develop && \ | |
git pull -r && \ | |
git checkout master && \ | |
git pull -r && \ | |
git checkout develop && \ | |
git checkout -b "release/$TAG" develop && \ | |
git checkout master && \ | |
git merge --no-ff "release/$TAG" && \ | |
git branch -d "release/$TAG" && \ | |
git tag -s -m "Version $TAG" "$TAG" && \ | |
git checkout develop && \ | |
git merge --no-ff "$TAG" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment