New to AzureDevOps, new to Blazor server.
If I have a yaml task like this in my Azure DevOps pipeline build and want to display the build name on the UI in a Blazor Server app, how would I be able to access this information? Can I write it to the csproj file? appsettings? I'm not coming up with much info online so far and seek guidance on how to implement this.
variables:
version.MajorMinor: '1.0' # Manually adjust the version number as needed for semantic versioning. Revision is auto-incremented.
version.Revision: $[counter(variables['version.MajorMinor'], 0)]
versionNumber: '$(version.MajorMinor).$(version.Revision)'
steps:
- task: PowerShell@2
displayName: Set the name of the build (i.e. the Build.BuildNumber)
inputs:
targetType: 'inline'
script: |
[string] $buildName = "$(versionNumber)_$(Build.SourceBranchName)"
Write-Host "Setting the name of the build to '$buildName'."
Write-Host "##vso[build.updatebuildnumber]$buildName"