Is it possible to Rename or give a custom name to a Build in VSTS?
You can update the build number for current build through Logging Command (e.g. Write-Host "##vso[build.updatebuildnumber]buildnumber"
).
Simple workflow of your code:
- Include
$(rev:.r)
in default build number format (Options), for example:$(date:yyyyMMdd)-$(rev:.r)
- Get current build number from pre-defined variable (
Build.BuildNumber/BUILD_BUILDNUMBER
) - Get the rev value from this build number in your code
- Read version number from
.version
file - Update build number through Logging Command
Under your build definition you can customize the build name (Build number format):
For example, I added the date variable $(Date:dd.MM.yyyy)
with a specific format to the field Build number format
: