I use Azure Pipeline for builds and have the folowing GitVersion.yml (i use v5 of gitversion):
...
branches:
main:
regex: ^main$
mode: ContinuousDeployment
tag: alpha
increment: Patch
prevent-increment-of-merged-branch-version: false
track-merge-target: true
source-branches: [ 'release' ]
is-mainline: true
is-release-branch: false
pull-request:
regex: ^(pull|pull\-requests|pr)[/-]
tag: alpha
mode: ContinuousDelivery
increment: Patch
prevent-increment-of-merged-branch-version: false
source-branches: [ 'main', 'release' ]
is-release-branch: false
is-mainline: false
Build on main produuce the PreReleaseLabel alpha as expected, but if i trigger the build from the PR its, alpha1234 with the number of the PR appended.
How can I ensure that i just get alpha for PR builds as well?