Created
March 14, 2016 14:05
-
-
Save juanfgs/188839272423ec12bd3f 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/bash | |
inc() | |
{ | |
shopt -s extglob | |
num=$(echo "$release_version" | sed 's/^[0-9]*\.[0-9]*\.//g') | |
let num++ | |
echo $release_version | sed -r s/[0-9]*$/$num/ | |
} | |
release_version=`git branch | grep -n -e 'release' | sed 's/^[^-]*-//g'` | |
new_version=$(inc) | |
git co master | |
git me release-$release_version | |
git tag -a $release_version -m "Release $release_version" | |
git co development | |
git me release-$release_version | |
git cob release-$new_version | |
git push origin master | |
git push origin --tags | |
git push origin development | |
git push --set-upstream origin release-$new_version | |
git push origin :release-$release_version | |
git branch -d release-$release_version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment