Closed prostakov closed 2 months ago
Please keep in mind that you are inheriting from the default workflow which is in your example the GitFlow/v1
workflow. Because you choice master instead of main, you are not overriding but defining a second definition for the master branch:
branches:
main:
regex: ^master$|^main$
...
master:
regex: ^master$
...
...
Saying: First comes first servers.
To the workflow
property you will find the following documentation:
workflow The base template of the configuration to use. Possible values are GitFlow/v1 or GitHubFlow/v1. Defaults to GitFlow/v1 if not set. To create a configuration from scratch without using a base template, please specify an empty string.
What you want is probably to define your configuration from scratch:
workflow: ''
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
tag-prefix: '[vV]?'
version-in-branch-pattern: (?<version>[vV]?\d+(\.\d+)?(\.\d+)?).*
...
Happy Branching!
Thank you very much.
It works. Had to add the strategies: [TaggedCommit]
though.
The final working configuration snippet looks like following:
workflow: ''
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatchTag
assembly-informational-format: '{InformationalVersion}'
mode: ContinuousDelivery
increment: None
tag-prefix: '[v]'
commit-message-incrementing: Disabled
commit-date-format: 'yyyy-MM-dd'
tag-pre-release-weight: 60000
strategies: [TaggedCommit]
branches:
master:
regex: ^master$
label: ''
increment: None
track-merge-target: false
tracks-release-branches: false
is-release-branch: false
release:
regex: ^release?[/-]
label: beta
increment: None
track-merge-target: true
tracks-release-branches: true
is-release-branch: true
Prerequisites
GitVersion package
GitVersion.Tool
GitVersion version
6.0.2
Operating system
macOS
What are you seeing?
I currently have following config:
And I currently have following situation in master branch:
The patch value gets automatically incremented once, on first commit after tagged commit. And since I set configuration on master:
increment: None
, this was not expected.What is expected?
The expected behavior would be like this:
This way the major-minor-patch gets fully controlled by release tag.
Steps to Reproduce
Tags commit with version, create extra 3 commits.
RepositoryFixture Test
No response
Output log or link to your CI build (if appropriate).
No response