Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When starting new release "Release branch already exists. Cannot start release." #23

Closed
ghost opened this issue Oct 8, 2016 · 15 comments

Comments

@ghost
Copy link

ghost commented Oct 8, 2016

When starting new release with mvn gitflow:release-start I receive an exception because of old-release branch... "Release branch already exists. Cannot start release." In fact, plugin refuses to create branch "release/1.0.1" because there is branch "release/1.0.0" already existing.
What is the correct workflow in case there are many installations of the product with different release versions so all release branches should be maintained? I use <keepBranch>true</keepBranch> because of that. However it causes this exception...
Btw. how is it possible to set <keepBranch>true</keepBranch> only for release, release-start and release-finish goals and keep it false for other goals in parent pom? It seems like goal release doesn't create release branch. It would be nice if it did in case keepBranch=true.

@aleksandr-m
Copy link
Owner

  1. Currently you can't set same parameter with different values for different goals, but it is on my todo list.
  2. There is no keepBranch for release goal. The point of the release is it doesn't create separate branch for the release. You can execute mvn gitflow:release-start gitflow:release-finish in one go to create a release branch and merge it.
  3. What do you mean by in case there are many installations of the product? Are you supporting multiple versions of your product simultaneously and want to use release branches as long running support branches? Can you elaborate on your workflow.

@ghost
Copy link
Author

ghost commented Oct 12, 2016

Hi @aleksandr-m
@ 2: it is only nice to have feature to create release branch in case <keepBranch>true</keepBranch> and would make real sense if we could have more release branches live side-by-side
@ 3: the workflow is pretty similar to well known http://nvie.com/posts/a-successful-git-branching-model/ Only difference is to not create hotfix branches from master but from "oldest" release branch where the bug appears. After fixing it merge it to all subsequent release branches, develop branch & master branch

@aleksandr-m
Copy link
Owner

In original nvie workflow release branch is dropped when it is merged to main branches and only one release branch is allowed at the time.
Maybe what you really need is support branches?

This plugin aims to support various git workflows so adding goal(s) for support branches sounds like a good idea. Also it is relatively easy to add option to allow multiple release branches, but if support branch goal(s) will be added maybe it isn't needed. Wdyt?

@ghost
Copy link
Author

ghost commented Oct 13, 2016

yeah, this looks like what I really need. It is almost the same as what I call release branch. Only difference I noticed it is created from master. I think it is perfectly acceptable. This seems to be another view to same "problem". Now I see, support branch can be created anytime from release-tag. Looks great. Btw. thank you for the link, I never found this page before. :)

@aleksandr-m
Copy link
Owner

@mireczatko Starting from the next release, support branches can be created by executing support-start goal. The hotfix goals were improved to support hotfixing support branches. :)

@ghost
Copy link
Author

ghost commented Apr 5, 2017

Great, @aleksandr-m, thank you for notice me :)

@aleksandr-m
Copy link
Owner

@mireczatko 1.5.0 is out.

@amitpatel1985
Copy link

$ git flow release start Test2
_Fatal: There is an existing release branch 'Test1'. Finish that one first._

When I am trying to create release branch when there is already one release branch getting above error from Gitbash. any idea how to fix this

@aleksandr-m
Copy link
Owner

@amitpatel1985 In the original gitflow it can be only one release branch at a time. Have you read this discussion and know about support branches? Why do you need multiple release branches?

@amitpatel1985
Copy link

In our project we will have time between acceptance test completion & Release and during that time other changes come due to that it we need to create release 2nd branch after finishing feature.

@thamacher
Copy link

But I think this approach still does not work with github-flow. Because I have to run a job twice. First I also get a `Release branch already exists. Cannot start release.' and running it for the 2nd time then works.

@aleksandr-m
Copy link
Owner

@thamacher What do you mean by that?

@kuhajeyan
Copy link

we are maintaining multiple release branches, and we dont necessarily delete them once we merge to master. In this case, when we are trying to release-start, we get this "release xxxx already exists. Finish that first!".

is there any parameter to suppress this existing version check?

@aleksandr-m
Copy link
Owner

Just rename them.

@kngmat004
Copy link

I really hope we could work on a separate config item to allow multiple release branches would be another plus for an already great plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants