Skip to content
Browse files

merge master into develop when finishing a release. If tag, merge the…

… tag; if notag, merge the master branch. This subtly changes the merge message to align with what flags were provided.
  • Loading branch information...
1 parent 07dacd5 commit e640746656eb23cc6556abbef2f66c060bf447c9 @bloveridge committed Dec 7, 2010
Showing with 14 additions and 7 deletions.
  1. +14 −7 git-flow-release
View
21 git-flow-release
@@ -247,15 +247,20 @@ cmd_finish() {
# try to merge into develop
# in case a previous attempt to finish this release branch has failed,
# but the merge into develop was successful, we skip it now
- if ! git_is_branch_merged_into "$BRANCH" "$DEVELOP_BRANCH"; then
+ if ! git_is_branch_merged_into "$MASTER_BRANCH" "$DEVELOP_BRANCH"; then
git checkout "$DEVELOP_BRANCH" || \
die "Could not check out $DEVELOP_BRANCH."
- # TODO: Actually, accounting for 'git describe' pays, so we should
- # ideally git merge --no-ff $tagname here, instead!
- git merge --no-ff "$BRANCH" || \
- die "There were merge conflicts."
- # TODO: What do we do now?
+ # merge the master branch back into develop; this makes the master
+ # branch - and the new tag (if provided) - a parent of the development
+ # branch, which in turn lets you use 'git describe' on either branch
+ if noflag notag; then
+ git merge --no-ff "$tagname" || \
+ die "There were merge conflicts."
+ else
+ git merge --no-ff "$MASTER_BRANCH" || \
+ die "There were merge conflicts."
+ fi
fi
# delete branch
@@ -285,8 +290,10 @@ cmd_finish() {
echo "- Release branch has been merged into '$MASTER_BRANCH'"
if noflag notag; then
echo "- The release was tagged '$tagname'"
+ echo "- Tag '$tagname' has been back-merged into '$DEVELOP_BRANCH'"
+ else
+ echo "- Branch '$MASTER_BRANCH' has been back-merged into '$DEVELOP_BRANCH'"
fi
- echo "- Release branch has been back-merged into '$DEVELOP_BRANCH'"
if flag keep; then
echo "- Release branch '$BRANCH' is still available"
else

0 comments on commit e640746

Please sign in to comment.
Something went wrong with that request. Please try again.