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
494 stars 182 forks source link

mvn gitflow:release-finish creates 2 tags remotely. Only one is expected #378

Closed phrouv closed 1 year ago

phrouv commented 1 year ago

I run mvn gitflow:release-finish successfully. When I list the remote tags, I notice that 2 tags have been created. One of them has the characters ^{} appended to the tag name.

 (release/1.1.1) $ mvn gitflow:release-finish
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Projet Principal - blocnotes2                                      [pom]
[INFO] blocnotes2-config                                                  [pom]
[INFO] blocnotes2-fwk                                                     [jar]
[INFO] blocnotes2-mas                                                     [jar]
[INFO] blocnotes2-services                                                [jar]
[INFO] bn                                                                 [war]
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 was not found in http://repo.appli.dgfip/nexus/content/groups/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of REPO-DGFIP has elapsed or updates are forced
[INFO]
[INFO] -------------< fr.gouv.impots.appli.blocnotes2:blocnotes2 >-------------
[INFO] Building Projet Principal - blocnotes2 1.1.1                       [1/6]
[INFO]   from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 was not found in http://repo.appli.dgfip/nexus/content/groups/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of REPO-DGFIP has elapsed or updates are forced
[INFO]
[INFO] --- gitflow:1.19.0:release-finish (default-cli) @ blocnotes2 ---
[INFO] Checking for uncommitted changes.
[INFO] Checking out 'release/1.1.1' branch.
[INFO] Checking for SNAPSHOT versions in dependencies.
[INFO] Fetching remote from 'origin'.
[INFO] Comparing local branch 'release/1.1.1' with remote 'origin/release/1.1.1'.
[INFO] Fetching remote from 'origin'.
[INFO] Comparing local branch 'develop' with remote 'origin/develop'.
[INFO] Fetching remote from 'origin'.
[INFO] Comparing local branch 'master' with remote 'origin/master'.
[INFO] Checking out 'release/1.1.1' branch.
[INFO] Checking out 'master' branch.
[INFO] Merging (--no-ff) 'release/1.1.1' branch.
[INFO] Creating '1.1.1' tag.
[INFO] Checking out 'develop' branch.
[INFO] Merging (--no-ff) '1.1.1' branch.
[INFO] Updating version(s) to '1.1.2-SNAPSHOT'.
[INFO] Committing changes.
[INFO] Pushing 'master' branch to 'origin'.
[INFO] Pushing 'develop' branch to 'origin'.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Projet Principal - blocnotes2 1.1.1:
[INFO]
[INFO] Projet Principal - blocnotes2 ...................... SUCCESS [ 20.299 s]
[INFO] blocnotes2-config .................................. SKIPPED
[INFO] blocnotes2-fwk ..................................... SKIPPED
[INFO] blocnotes2-mas ..................................... SKIPPED
[INFO] blocnotes2-services ................................ SKIPPED
[INFO] bn ................................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  20.902 s
[INFO] Finished at: 2023-02-23T16:18:26+01:00
[INFO] ------------------------------------------------------------------------
(develop) $ git ls-remote --tags origin
85e4a611b0dc1448ecfd0c13c31b9fefd7af7b57        refs/tags/1.1.0
33366222424d325f9098290eb13b8d6f6b9622dc        refs/tags/1.1.1
41ca249891b631a8c1b56d8824ca5f817b227a19        refs/tags/1.1.1^{}
0ccb5bb2e4b0aaec277986c5db00e59f5b070cc7        refs/tags/BN.2023.P01
14b4095e90861ef3d4f10c43b301786b9a2e510b        refs/tags/TOPAD-TAG
2ce6d080f7b5abaea30f1ee9633ad9f2e75ef609        refs/tags/test

(develop) $ git show 33366222424d325f9098290eb13b8d6f6b9622dc
tag 1.1.1
Tagger: prouvray <phrouv@lycos.com>
Date:   Thu Feb 23 16:18:16 2023 +0100

Tag release

commit 41ca249891b631a8c1b56d8824ca5f817b227a19 (tag: 1.1.1, origin/master, origin/HEAD, master)
Merge: 85e4a61 69d2961
Author: prouvray <phrouv@lycos.com>
Date:   Thu Feb 23 16:18:15 2023 +0100

    Merge branch 'release/1.1.1'

(develop) $ git show 41ca249891b631a8c1b56d8824ca5f817b227a19
commit 41ca249891b631a8c1b56d8824ca5f817b227a19 (tag: 1.1.1, origin/master, origin/HEAD, master)
Merge: 85e4a61 69d2961
Author: prouvray <phrouv@lycos.com>
Date:   Thu Feb 23 16:18:15 2023 +0100

    Merge branch 'release/1.1.1'

teleir-rouvray01@Z093-0001690 /c/dev/git2/blocnotes2 (develop) $ git show 1.1.1
tag 1.1.1
Tagger: prouvray <phrouv@lycos.com>
Date:   Thu Feb 23 16:18:16 2023 +0100

Tag release

commit 41ca249891b631a8c1b56d8824ca5f817b227a19 (tag: 1.1.1, origin/master, origin/HEAD, master)
Merge: 85e4a61 69d2961
Author: prouvray <phrouv@lycos.com>
Date:   Thu Feb 23 16:18:15 2023 +0100

    Merge branch 'release/1.1.1'

(develop) $ git tag -l
1.1.0
1.1.1
BN.2023.P01
TOPAD-TAG
test

(develop) $ git show 1.1.1
tag 1.1.1
Tagger: prouvray <phrouv@lycos.com>
Date:   Thu Feb 23 16:18:16 2023 +0100

Tag release

commit 41ca249891b631a8c1b56d8824ca5f817b227a19 (tag: 1.1.1, origin/master, origin/HEAD, master)
Merge: 85e4a61 69d2961
Author: prouvray <phrouv@lycos.com>
Date:   Thu Feb 23 16:18:15 2023 +0100

    Merge branch 'release/1.1.1'
aleksandr-m commented 1 year ago

It is the way Git lists tags - see.

A suffix ^ followed by an empty brace pair means the object could be a tag, and dereference the tag recursively until a non-tag object is found.