0 votes
1 view
in Azure by (33.1k points)

I would like to update the Build.BuildNumber variable from a powershell script as a build step.

I've tried:

Write-Host "##vso[task.setvariable variable=BUILD_BUILDNUMBER]1.2.3.4"

and

Write-Host "##vso[task.setvariable variable=Build.BuildNumber]1.2.3.4"

This has not worked.

1 Answer

0 votes
by (16.8k points)

You'd need to use the Update Build Number function:

Write-Host "##vso[build.updatebuildnumber]1.0.0.$($env:Build_BuildId)"

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...