In the build pipeline I have a job with a powershell script setting the applicatiuon name based on a variable like this:
$applicationName = If ('$(configuration)' -eq 'Release') { 'Appname' } Else { 'Appname-Test' }
Write-Host "##vso[task.setvariable variable=applicationName]$applicationName"
I try to set the display name of the PublishBuildArtifacts@1
variable to the variable like this:
- task: PublishBuildArtifacts@1
displayName: $[variables.applicationName] # runtime variable
But this literally displays $[variables.applicationName]
instead of the variable value. How can I change the displayname of a task based on a variable?