Unexpected value of CommitsSinceVersionSource in certain branch setup #4759
-
|
In one of my projects, I have the following workflow:
I've come up with the following config for GitVersion 6 workflow: ''
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
tag-prefix: '[vV]?'
tag-pre-release-weight: 60000
commit-date-format: yyyy-MM-dd
merge-message-formats: {}
update-build-number: true
semantic-version-format: Strict
strategies:
- TaggedCommit
branches:
develop:
regex: ^dev$
increment: Minor
label: alpha
is-source-branch-for:
- release/qa
- feature
prevent-increment:
of-merged-branch: true
when-current-commit-tagged: false
release/qa:
regex: ^release/qa$
increment: None
label: beta
is-source-branch-for:
- main
prevent-increment:
of-merged-branch: true
main:
mode: ContinuousDeployment
regex: ^master$
increment: None
label: ''
is-release-branch: true
is-main-branch: true
feature:
increment: Inherit
regex: (?<BranchName>(?!dev$|release\/qa$|master$).+)
label: '{BranchName}'
mode: ContinuousDelivery
track-merge-target: false
track-merge-message: false
commit-message-incrementing: Disabled
regex: ''
source-branches: []
is-source-branch-for: []
tracks-release-branches: false
is-release-branch: false
is-main-branch: falseLong story short, before merging Here is an example
I understand why it works this way: GitVersion runs I'm wondering if anyone has come across something similar and if there is a workaround for this? And if it makes sense to introduce an ability to achieve the more intuitive behaviour? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
No, this is not possible. You can find the logic at the following location: I was thinking that it might be possible to create a new GitVersion variable in order to build a customized InformationalVersion (by specifying |
Beta Was this translation helpful? Give feedback.
No, this is not possible. You can find the logic at the following location:
GitVersion/src/GitVersion.Core/VersionCalculation/VersionCalculators/VersionCalculatorBase.cs
Lines 17 to 23 in 382fa3a
I was thinking that it might be possible to create a new GitVersion variable in order to build a customized InformationalVersion (by specifying
assembly-informational-format). Could you ple…