Skip to content

Goal hotfix-finish runs post hotfix goals on wrong branch #402

Open
@fhenning

Description

@fhenning

The goal hotfix-finish runs the post hofix goals on the wrong branch, if the option skipReleaseMergeProdBranch is set to true.

After some digging around I noticed that in GitFlowHotFixFinishMojo on line 261 there is the check if (skipMergeProdBranch && (supportBranchName == null)), if both conditions are true then it switches to the production branch. However, on line 267 it checks if it should run the post hotfix goals, which is just below the mentioned check.

If my understanding is correct, the finish goals runs the post hotfix goals on the hotfix only if there is a support branch or if skipMergeProdBranch is false. I expected that the post goals would execute from:

  1. the support branch after merging, if there is a support branch
  2. or the production branch after merging, if the merge is not skipped
  3. or the hotfix branch, if the option skipMergeProdBranch is true.

I just want to check if my understanding is correct or that I'm missing something here, before I create a pull-request (the change is rather simple move switching to the production after running the post hotfix goals).

I ran into the problem after moving to your gitflow plugin from the Atlassian one (jgitflow), which is no longer maintained.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions