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
488 stars 180 forks source link

Tag is not pushed with options -DskipMergeDevBranch -DskipMergeProdBranch #349

Closed AdrienHorgnies closed 2 years ago

AdrienHorgnies commented 2 years ago

Hi,

I'm using the plugin to hotfix a version older than the last minor. For example, let's say my repo have versions v0.1.0, v0.1.1 and v0.2.0. I created a branch hotfix/0.1.2 from tag v0.1.1. In this branch, I add a commit to change the version of all the maven modules from 0.1.1 to 0.1.2-SNAPSHOT.

Then, I use the command mvn gitflow:hotfix-finish -DhotfixBranch=hotfix/0.1.2 -DskipMergeDevBranch -DskipMergeProdBranch. The plugin adds a commit that changes the version from 0.1.2-SNAPSHOT to 0.1.2 and tag this commit with v0.1.2. But I expect it to push the tag to the remote, which it doesn't. I guess that the plugin usually pushes tag along a branch, but I don't merge into any branch here. And I don't want to, as it'll create merge conflicts that I prefer to handle in another flow.

Here's my configuration :

<configuration>
    <verbose>true</verbose>
    <commitDevelopmentVersionAtStart>true</commitDevelopmentVersionAtStart>
    <pushRemote>true</pushRemote>
    <keepBranch>false</keepBranch>
    <digitsOnlyDevVersion>true</digitsOnlyDevVersion>
    <useSnapshotInHotfix>true</useSnapshotInHotfix>
    <useSnapshotInRelease>true</useSnapshotInRelease>
    <useSnapshotInSupport>true</useSnapshotInSupport>
    <versionDigitToIncrement>1</versionDigitToIncrement>
    <hotfixVersionDigitToIncrement>2</hotfixVersionDigitToIncrement>
    <skipFeatureVersion>true</skipFeatureVersion>
    <skipTestProject>true</skipTestProject>
    <gitFlowConfig>
        <versionTagPrefix>v</versionTagPrefix>
    </gitFlowConfig>
    <commitMessages>
        [redacted]
    </commitMessages>
</configuration>
aleksandr-m commented 1 year ago

1.19.0 is released.

AdrienHorgnies commented 1 year ago

Great job !