branches:
main:
regex: ^master$|^main$
mode: ContinuousDelivery
tag: ''
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
tracks-release-branches: false
is-release-branch: false
release:
regex: ^releases?[/-]
mode: ContinuousDelivery
tag: beta
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
tracks-release-branches: false
is-release-branch: true
pre-release-weight: 1000
feature:
regex: ^features?[/-]
mode: ContinuousDelivery
tag: useBranchName
increment: Inherit
prevent-increment-of-merged-branch-version: false
track-merge-target: false
tracks-release-branches: false
is-release-branch: false
pull-request:
regex: ^(pull|pull\-requests|pr)[/-]
mode: ContinuousDelivery
tag: PullRequest
increment: Inherit
prevent-increment-of-merged-branch-version: false
tag-number-pattern: '[/-](?<number>\d+)[-/]'
track-merge-target: false
tracks-release-branches: false
is-release-branch: false
hotfix:
regex: ^hotfix(es)?[/-]
mode: ContinuousDelivery
tag: beta
increment: Patch
prevent-increment-of-merged-branch-version: false
track-merge-target: false
tracks-release-branches: false
is-release-branch: false
support:
regex: ^support[/-]
mode: ContinuousDelivery
tag: ''
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
tracks-release-branches: false
is-release-branch: false
develop:
regex: ^dev(elop)?(ment)?$
mode: ContinuousDeployment
tag: unstable
increment: Minor
prevent-increment-of-merged-branch-version: false
track-merge-target: true
tracks-release-branches: true
is-release-branch: false
Can someone explain the GitVersion.yml file.How it works.ALso I dont want to create release with betaxxxx.I just wanted to release the version with only number like 1.1.2/1.1.3. What changes I have to make in this GitVersion file?
According to your gitversion.yml file, the only releasable branch is release branch.
The semver you get from every commit from those release branches will have a beta tag added. Even if you name your release branch like releases/v1.2.3, you will get 1.2.3-beta.someNumber.
To get semver 1.2.3, you must make a git tag to the commit in your release branch, v1.2.3. GitVersion recognizes that the commit has a git tag, and will use the version in the git tag as semver.
This behavior is fulfilled by a default gitversion configuration: tag-prefix: '[vV]', which is not present in your yml file. You can find this config in the complete list of configuration GitVersion use on top of your gitversion.yml file, with gitversion -showconfig or dotnet gitversion -showconfig, for whichever way you have gitversion installed.
gitversion.yml.Read more here: https://gitversion.net/docs/reference/configuration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With