Last active
February 27, 2021 15:18
-
-
Save filipedfs/01b666d2fb1ef9287e76b6f4b5282485 to your computer and use it in GitHub Desktop.
Git Flow
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
| version=$1 | |
| if [ -z "$version" ] | |
| then | |
| echo "The version of the release: " | |
| read -r version | |
| fi | |
| if [ -z "$version" ] | |
| then | |
| echo Version not defined | |
| else | |
| branchname="release/$version" | |
| git checkout master | |
| git merge --no-ff --no-edit $branchname | |
| git tag -a v$version -m "Virtual Choir v$version" | |
| git checkout develop | |
| git merge --no-ff --no-edit $branchname | |
| git branch -d $branchname | |
| git push origin develop:develop | |
| git push origin master:master | |
| git push --tags | |
| echo "Summary of actions:" | |
| echo "- Release branch '$branchname' has been merged into 'master'" | |
| echo "- The release was tagged 'v$version'" | |
| echo "- Release tag 'v$version' has been back-merged into 'develop'" | |
| echo "- Release branch '$branchname' has been locally deleted" | |
| echo "- You are now on branch 'develop'" | |
| fi |
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
| version=$1 | |
| if [ -z "$version" ] | |
| then | |
| echo "The version of the release: " | |
| read -r version | |
| fi | |
| if [ -z "$version" ] | |
| then | |
| echo Version not defined | |
| else | |
| branchname="release/$version" | |
| git checkout -b $branchname develop | |
| echo "Summary of actions:" | |
| echo "- A new branch '$branchname' was created, based on 'develop'" | |
| echo "- You are now on branch '$branchname'" | |
| echo "" | |
| echo "Follow-up actions:" | |
| echo "- Bump the version number now!" | |
| echo "- Start committing last-minute fixes in preparing your release" | |
| echo "- When done, run:" | |
| echo "" | |
| echo " git-flow-release-finish $version" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment