Reputation: 599
We're using NB.GV in our CI pipeline like:
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path . nbgv --ignore-failed-sources
displayName: Install NBGV tool
- script: nbgv cloud -c -a
displayName: Set Version
It sets the version correctly, so in further tasks, we're able to use them (e.g. $(GitBuildVersion))
The problem comes when we're trying to setup a CD pipeline based on this article. There we need to read $(Build.BuildNumber)
which has a different value than expected. Based on official documentation it should be e.g. 1.3.1.57621 but we're getting 1.3.1+g15e1898f47.
It seems like AssemblyInformationalVersion and BuildVersion got exchanged.
We have set setVersionVariables: true
in version.json.
Thanks for any help in advance
Upvotes: 0
Views: 1290
Reputation: 40779
You my add this after running ngbv to update you BuildNumber
- powershell: Write-Host "##vso[build.updatebuildnumber]$(GitBuildVersion)"
displayName: 'Update build number to $(GitBuildVersion)'
According to this you should have then expected value:
You may also check what variables you have by running - bash: env | sort
Upvotes: 2