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.
This is a pull request to address issue #266
sorry for coming to this too late.
this PR is meant for discussing a possible solution to this issue, the idea is that I want to use a single snapshot version e.g HEAD-SNAPSHOT for the development while using the incremental release version feature
the idea in this pull request is to use different properties from the project to hold the values for the next snapshot version and next release value, and the plugin will read from those properties instead of using the current project version.
Example
In the project properties, we can define 2 properties one for snapshot version and one for release version
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
<version>1.15.3-SNAPSHOT</version>
<configuration>
<!-- tell the plugin which properties to use -->
<snapshotVersionProperty>next.snapshot.version</snapshotVersionProperty>
<releaseVersionProperty>next.release.version</releaseVersionProperty>
<!-- -->
<commitDevelopmentVersionAtStart>true</commitDevelopmentVersionAtStart>
<versionDigitToIncrement>${bump.digit}</versionDigitToIncrement>
<preReleaseGoals>verify</preReleaseGoals>
<preHotfixGoals>verify</preHotfixGoals>
<gitFlowConfig>
<productionBranch>main</productionBranch>
<developmentBranch>development</developmentBranch>
</gitFlowConfig>
</configuration>
</plugin>
And then when we go through the release start/finish process we end up with a release tag branch with the new incremented release version while the development branch will remain always on HEAD-SNAPSHOT
if the properties are not provided the plugin will use the default behavior.
Please notice that this is my first time ever look at a maven plugin code and my first code related to a maven plugin, so I am not very confident about my code but I made this PR to demonstrate my idea.
This is a pull request to address issue #266 sorry for coming to this too late.
this PR is meant for discussing a possible solution to this issue, the idea is that I want to use a single snapshot version e.g
HEAD-SNAPSHOT
for the development while using the incremental release version featurethe idea in this pull request is to use different properties from the project to hold the values for the next snapshot version and next release value, and the plugin will read from those properties instead of using the current project version.
Example
In the project properties, we can define 2 properties one for snapshot version and one for release version
in the plugin configuration
we could have something like this
And then when we go through the release start/finish process we end up with a release tag branch with the new incremented release version while the development branch will remain always on HEAD-SNAPSHOT
if the properties are not provided the plugin will use the default behavior.
Thank you.