gitversion does not tag the main branch as expected

Viewed 139

I'm new working with gitversion and I'm getting so confused.

I have an use case as follow:

I have 5 branches: Main, QA, dev, Feature/ and hotfix/

Each of those branches have an specific tag equal to the branch name, like:

Main: prod, feature: feature...A pull request to the main would be: 1.1.0-main and so on.

The condition that I have is if I want to merge a change into dev, QA or main branch... those merge need to be doing trough a pull request.

but when I send a pull request to the main and approve it, the tag version is like 1.1.0-prod.58....

58 is not supposed to be :(

The gitversion file that I'm using is (I'm using only 2 branches to test):

mode: Mainline
branches: 
  prod:
    regex: ^master$
    tag: 'prod'
    increment: Patch
    prevent-increment-of-merged-branch-version: true
    track-merge-target: false
    source-branches: ['dev']
    is-source-branch-for: ['dev']
    tracks-release-branches: false
    is-release-branch: false
    is-mainline: true
    pre-release-weight: 55000
  dev:
    regex: ^dev(elop)?(ment)?$
    tag: dev
    increment: Minor
    prevent-increment-of-merged-branch-version: false
    track-merge-target: true
    source-branches: ['prod']
    is-source-branch-for: []
    tracks-release-branches: true
    is-release-branch: false
    is-mainline: false
    pre-release-weight: 0
ignore:
  sha: []
merge-message-formats: {}
0 Answers
Related