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 fails in non-interactive mode if hotfix branch does not exist locally #409

Open
paschi opened this issue Aug 16, 2024 · 0 comments

Comments

@paschi
Copy link

paschi commented Aug 16, 2024

When trying to run hotfix-finish in non-interactive mode, the goal will fail if the hotfix branch does not exist on the local environment.

For example

mvn gitflow:hotfix-start -B -DhotfixVersion=1.6.2 -DpushRemote=true
git checkout master
git branch -D hotfix/1.6.2
mvn gitflow:hotfix-finish -B -DhotfixVersion=1.6.2 -DpushRemote=true

results in

[ERROR] Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.21.0:hotfix-finish (default-cli) on project test-repo: hotfix-finish: Hotfix branch with name 'hotfix/1.6.2' doesn't exist. Cannot finish hotfix. -> [Help 1]

IMHO it should check if the branch exists on remote instead of local and fetch it if it is not yet present locally. That way it would be consistent with how the release-finish goal works.

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

No branches or pull requests

1 participant