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

Add the parameter skipMergeDevBranch on gitflow:release-finish goal #237

Closed
jst39 opened this issue Jun 9, 2020 · 8 comments
Closed

Add the parameter skipMergeDevBranch on gitflow:release-finish goal #237

jst39 opened this issue Jun 9, 2020 · 8 comments

Comments

@jst39
Copy link

jst39 commented Jun 9, 2020

Hello,

I'm using your plugin to release projects. All works fine, thanks for your work.
In my proejcts, I need to do a PR on develop branch after a gitflow:release-finish goal.

So, is it possible to add the parameter skipMergeDevBranch on gitflow:release-finish goal ? Like the parameter on the gitflow:hotfix-finish goal ?

Thanks in advance.

@aleksandr-m
Copy link
Owner

@jst39 Why do you need to do a PR to develop branch?
Can it be related to #226?

@jst39
Copy link
Author

jst39 commented Jun 23, 2020

Hi @aleksandr-m, thanks for your reply.
No it's not related. it's to be compliant with existing processes.

@aleksandr-m
Copy link
Owner

@jst39 Can you tell more about why do you need this? It is a bit unusual to do a PR to develop branch.

@jst39
Copy link
Author

jst39 commented Jul 7, 2020

@aleksandr-m ,

I think it's for 2 reasons :

  • you have more control on what you merge on your develop branch.
  • in some particular case you can have conflict (pom version for example).

@lrkwz
Copy link

lrkwz commented Nov 24, 2020

I would find it useful in multi-module projects

aggregator -|
            |- lib module
            |- app module

Assuming that both modules start with version 0.1-SNAPSHOT, both on develop branch:

  1. cd lib-module; mvn gitflow:release ->
    1.1 lib module 0.1-SNAPSHOT installs 0.1
    1.2 commits 0.2-SNAPSHOT
    1.3 app-module's pom.xml (still in develop branch) lib dependency is automatically updated with 0.2-SNAPSHOT
    (so far so good)
  2. cd app-module; mvn gitflow:release-start -DallowSnapshots
    2.1 edit app-module's pom.xml and set lib dependency version to 0.1
    2.2 mvn gitflow:release-finish
    2.3 app-module's pom.xml in develop branch is merged and now contains 0.1 instead of 0.2-SNAPSHOT :-(

So adding -DskipMergeDevBranch to the last release-finish would leave the pom.xml in the correct development configuration ... or there's another way to achieve the same result I'm not aware of?

@manuelnucci
Copy link

manuelnucci commented Sep 30, 2021

@aleksandr-m I'd also find it really useful. Our process requires that all merges to develop or master branches are made through a Merge Request in order to have certain approvals from Code Owners, QA, Security, etc.

Having the skipMergeDevBranch flag both in gitflow:release-finish and gitflow:feature-finish would mean that the specific branch (feature/XXX or release/XXX) is updated remotely and, then, the MR can be created thorugh the UI to use the special features that GitLab provides.

I'm quite surprised that navigating through all the issues nobody has mentioned this specific use case, which is quite normal nowadays in the world of CI/CD.

@AdrienHorgnies
Copy link

I've created the PR #368 to do exactly that.

@aleksandr-m
Copy link
Owner

1.20.0 is out.

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