-
Notifications
You must be signed in to change notification settings - Fork 75
Description
Prerequisites
- I have written a descriptive issue title
- I have searched issues to ensure it has not already been reported
GitVersion package
AzureDevops task
What are you seeing?
Azure DevOps task: gitversion/execute@3.1.1 always overrides $(Build.BuildNumber) with the FullSemVer value.
The problem with this behavior is that FullSemVer appends a suffix (e.g., +88) to the version, which is incompatible with tools like docker build that require a clean version format. This limits the usability of the version number in such scenarios.
Using overrideConfig does not change anything.
inputs:
overrideConfig: |
update-build-number=false
What is expected?
It would be ideal to have the ability to choose which Version Variables from GitVersion are set into $(Build.BuildNumber). For example, allowing the use of SemVer
instead of FullSemVer
would produce a cleaner version number (1.2.3 instead of 1.2.3+88), which is more compatible with tools like docker build
.
Steps to Reproduce
Probably this one should be parametrized:
https://github.com/GitTools/actions/blob/main/src/tools/gitversion/tool.ts#L73
Output log or link to your CI build (if appropriate).
The build from a branch got next logs
GitVersion executed successfully
Async Command Start: Update Build Number
Update build number to 1.2.1-feature-23653-kpis-on-demand.1+17 for build 90059
Async Command End: Update Build Number
Finishing: Determine Semantic Version