Running GitVersion via AzureDevops and receive the following error message when attempting to use on any branch except master (incl, pull request branches, etc.);
So far i've tried to resolve the issue via:
- Increasing the checkout depth
- Manually specifying the next version via the next-version setting
Error:
Gitversion could not determine which branch to treat as the development branch
Git Version File
mode: Mainline
branches:
master:
regex: master
increment: Patch
assembly-informational-format: '{MajorMinorPatch}+Branch.{BranchName}{PreReleaseTag}'
major-version-bump-message: '\+semver:\s?(breaking|major)'
minor-version-bump-message: '\+semver:\s?(feature|minor)'
patch-version-bump-message: '\+semver:\s?(fix|patch)'
commit-message-incrementing: Enabled
tag-prefix: '[vV]'
ignore:
sha: []
YAML Pipeline
- task: gitversion/setup@0
displayName: gitversion/setup
inputs:
versionSpec: '5.10.3'
- task: gitversion/execute@0
displayName: gitversion/execute
inputs:
useConfigFile: true
configFilePath: GitVersion.yml