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

hotfix-finish failing when release branch exists #391

Closed
ptaylor opened this issue May 22, 2023 · 2 comments
Closed

hotfix-finish failing when release branch exists #391

ptaylor opened this issue May 22, 2023 · 2 comments
Assignees
Labels

Comments

@ptaylor
Copy link

ptaylor commented May 22, 2023

Using latest version 1.19.0 with the following steps

  • release-start (version -> 1.23.0-SNAPSHOT)
  • hotfix-start (version -> 1.22.1-SNAPSHOT)
  • hotfix-finish

The last step is failing with 'hotfix-finish: fatal: a branch named 'release/1.23.0' already exists'. I'm trying to understand why its trying to create the existing release branch? Is there a flag to prevent this from happening?

This does not happen with version 1.18.0.

mvn --batch-mode -Dverbose=true -DcommitDevelopmentVersionAtStart=true -DversionDigitToIncrement=1 -DpushRemote=true -DkeepBranch=false -DskipTestProject=true -DuseSnapshotInRelease=true -DuseSnapshotInHotfix=true -DhotfixVersion=1.22.1 com.amashchenko.maven.plugin:gitflow-maven-plugin:1.19.0:hotfix-finish
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] gitflow-test                                                       [pom]
[INFO] gitflow-test-submodule                                             [jar]
[INFO] 
[INFO] ------------------< com.mastercard.test:gitflow-test >------------------
[INFO] Building gitflow-test 1.22.1-SNAPSHOT                              [1/2]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- gitflow-maven-plugin:1.19.0:hotfix-finish (default-cli) @ gitflow-test ---
[INFO] Checking for uncommitted changes.
[INFO] Fetching remote from 'origin'.
"origin/hotfix/1.22.1"
[INFO] Comparing local branch 'hotfix/1.22.1' with remote 'origin/hotfix/1.22.1'.
0	0
[INFO] Fetching remote from 'origin'.
"origin/develop"
[INFO] Comparing local branch 'develop' with remote 'origin/develop'.
0	0
[INFO] Fetching remote from 'origin'.
"origin/master"
[INFO] Comparing local branch 'master' with remote 'origin/master'.
0	0
[INFO] Fetching remote from 'origin'.
"origin/release/1.23.0"
[INFO] Creating a new branch 'release/1.23.0' from 'origin/release/1.23.0'.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for gitflow-test 1.22.1-SNAPSHOT:
[INFO] 
[INFO] gitflow-test ....................................... FAILURE [  4.323 s]
[INFO] gitflow-test-submodule ............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.568 s
[INFO] Finished at: 2023-05-22T15:58:37+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.19.0:hotfix-finish (default-cli) on project gitflow-test: hotfix-finish: fatal: a branch named 'release/1.23.0' already exists -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

@aleksandr-m aleksandr-m self-assigned this May 25, 2023
@aleksandr-m
Copy link
Owner

@ptaylor 1.20.0 is released with a fix.

@ptaylor
Copy link
Author

ptaylor commented Jun 2, 2023

Thanks. Confirmed this is working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants