aleksandr-m / gitflow-maven-plugin

The Git-Flow Maven Plugin supports various Git workflows, including GitFlow and GitHub Flow. This plugin runs Git and Maven commands from the command line.
https://aleksandr-m.github.io/gitflow-maven-plugin/
Apache License 2.0
493 stars 181 forks source link

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

Closed jst39 closed 1 year ago

jst39 commented 4 years ago

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 commented 4 years ago

@jst39 Why do you need to do a PR to develop branch? Can it be related to https://github.com/aleksandr-m/gitflow-maven-plugin/issues/226?

jst39 commented 4 years ago

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

aleksandr-m commented 4 years ago

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

jst39 commented 4 years ago

@aleksandr-m ,

I think it's for 2 reasons :

lrkwz commented 3 years ago

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 commented 2 years ago

@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 commented 1 year ago

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

aleksandr-m commented 1 year ago

1.20.0 is out.