Prerequisites
GitVersion package
AzureDevops task
GitVersion version
6.0.5
Operating system
Linux
What are you seeing?
Using configuration below, GitVersion bumps Patch instead of Minor for master branch. For release branches it works correctly:
assembly-versioning-format: '{Major}.{Minor}'
assembly-file-versioning-format: '{Major}.{Minor}'
assembly-informational-format: '{Major}.{Minor}'
minor-version-bump-message: \+hfsemver:\s?(feature|minor)
major-version-bump-message: \+hfsemver:\s?(breaking|major)
commit-date-format: yyyyMMddTHHmmss
tag-prefix: 'hf'
semantic-version-format: Loose
branches:
master:
regex: ^master$|^main$
increment: Minor
is-release-branch: false
track-merge-target: false
tracks-release-branches: false
release:
regex: ^releases(?:_customer)?\/\d+\.\d+$
increment: Minor
prevent-increment:
of-merged-branch: true
track-merge-target: false
tracks-release-branches: false
source-branches:
- master
What is expected?
I expect a correct version number to get bumped when configured so.
Steps to Reproduce
Using following AD tasks and configuration mentioned above, run gitversion on master branch.
- task: gitversion/setup@3.1.11
inputs:
versionSpec: '6.0.5'
- ${{ each configuration in parameters.configurations }}:
- task: gitversion/execute@3.1.11
displayName: 'GitVersion calculate based on GitVersion.yml'
name: GitVersion
inputs:
targetPath: '$(Build.Repository.LocalPath)'
disableCache: true
useConfigFile: true
configFilePath: '$(Build.Repository.LocalPath)/GitVersion.yml'
RepositoryFixture Test
No response
Output log or link to your CI build (if appropriate).
log on Master
=====================================================================================
INFO [25-02-28 8:11:04:21] 1 commits found between '7804313' - Verze 1.275 byla uzavřena [skip ci] and 'ec8be9b' - hf
INFO [25-02-28 8:11:04:22] -< End: Using continuous delivery workflow to calculate the incremented version. (Took: 2.63ms) >-
INFO [25-02-28 8:11:04:38] Found configuration file at '/home/vsts/work/1/s/GitVersionHotfixIncrease.yml'
{
"AssemblySemFileVer": "276.0",
"AssemblySemVer": "276.0",
"BranchName": "master",
"BuildMetaData": null,
"CommitDate": "20250228T080807",
"CommitsSinceVersionSource": 1,
"EscapedBranchName": "master",
"FullBuildMetaData": "Branch.master.Sha.ec8be9bc4f35519e0b109c0f3d6c87681f0ae618",
"FullSemVer": "276.0.1-1",
"InformationalVersion": "276.0",
"Major": 276,
"MajorMinorPatch": "276.0.1",
"Minor": 0,
"Patch": 1,
"PreReleaseLabel": "",
"PreReleaseLabelWithDash": "",
"PreReleaseNumber": 1,
"PreReleaseTag": "1",
"PreReleaseTagWithDash": "-1",
"SemVer": "276.0.1-1",
"Sha": "ec8be9bc4f35519e0b109c0f3d6c87681f0ae618",
"ShortSha": "ec8be9b",
"UncommittedChanges": 0,
"VersionSourceSha": "780431367ebd520b4ad8823c4e54a2f156ee9f30",
"WeightedPreReleaseNumber": 55001
}
-------------------
GitVersion executed successfully
Async Command Start: Update Build Number
Update build number to 276.0.1-1 for build 333475
Async Command End: Update Build Number
Finishing: GitVersion calculate based on GitVersionHotfixIncrease.yml
=====================================================================================
log on releases
=====================================================================================
INFO [25-02-28 8:05:22:84] 5 commits found between 'bb9221d' - Verze 1.274 byla uzavřena [skip ci] and '8234646' - hf
INFO [25-02-28 8:05:22:84] -< End: Using manual deployment workflow to calculate the incremented version. (Took: 2.31ms) >-
INFO [25-02-28 8:05:23:24] Found configuration file at '/home/vsts/work/1/s/GitVersionHotfixIncrease.yml'
{
"AssemblySemFileVer": "275.1",
"AssemblySemVer": "275.1",
"BranchName": "releases/1.275",
"BuildMetaData": 5,
"CommitDate": "20250228T080209",
"CommitsSinceVersionSource": 5,
"EscapedBranchName": "releases-1-275",
"FullBuildMetaData": "5.Branch.releases-1.275.Sha.82346460563debb05eca96591d5c576bdf98ac15",
"FullSemVer": "275.1.0-beta.1+5",
"InformationalVersion": "275.1",
"Major": 275,
"MajorMinorPatch": "275.1.0",
"Minor": 1,
"Patch": 0,
"PreReleaseLabel": "beta",
"PreReleaseLabelWithDash": "-beta",
"PreReleaseNumber": 1,
"PreReleaseTag": "beta.1",
"PreReleaseTagWithDash": "-beta.1",
"SemVer": "275.1.0-beta.1",
"Sha": "82346460563debb05eca96591d5c576bdf98ac15",
"ShortSha": "8234646",
"UncommittedChanges": 0,
"VersionSourceSha": "bb9221d377f40b58198a4aa87884d7b9aff644d8",
"WeightedPreReleaseNumber": 30001
}
-------------------
GitVersion executed successfully
Async Command Start: Update Build Number
Update build number to 275.1.0-beta.1+5 for build 333472
Async Command End: Update Build Number
Finishing: GitVersion calculate based on GitVersionHotfixIncrease.yml
=====================================================================================
Prerequisites
GitVersion package
AzureDevops task
GitVersion version
6.0.5
Operating system
Linux
What are you seeing?
Using configuration below, GitVersion bumps Patch instead of Minor for master branch. For release branches it works correctly:
What is expected?
I expect a correct version number to get bumped when configured so.
Steps to Reproduce
Using following AD tasks and configuration mentioned above, run gitversion on master branch.
RepositoryFixture Test
No response
Output log or link to your CI build (if appropriate).