更新时间:2023-11-17 22:20:28
在构建管道中.
您可以自定义管道运行的命名/编号方式.参考: https://docs.microsoft.com/zh-cn/azure/devops/pipelines/process/run-number?view=azure-devops&tabs=yaml
在YAML中,此属性称为名称.
使用变量设置您的主要版本,次要版本等,并使用计数器Ref生成补丁版本: https://docs.microsoft.com/zh-CN/azure/devops/pipelines/release/?view=azure-devops#how-do-i-manage-the-为新版本命名.
I want to change release names like V.1.0.00
for manual release in Continuous Delivery of Azure DevOps but i can't able to delete or change the naming without this $(rev:r)
, how can I use a custom name?
Default Name: Release- $(rev:r)
Required Name: V.1.0.0
In the build Pipeline.
You can customize how your pipeline runs are named/numbered. Ref : https://docs.microsoft.com/en-us/azure/devops/pipelines/process/run-number?view=azure-devops&tabs=yaml
In YAML, this property is called name.
Use variables to set your major version, minor version etc and generate the patch version using counter Ref : https://docs.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops#counter.
for your case you can set major : V.1 minor : 0 patch : $[counter(format('{0}.{1}', variables['major'], variables['minor']), 1)]
and set the name like name: $(major_version).$(minor_version).$(patch_version)
Release pipeline
Refer to $(Build.BuildNumber) which will ref to the buildpipeline custom name/number set in the build pipeline. You can change this naming scheme by editing the release name format mask. In the Options tab of a release pipeline, edit the Release name format property in the General page. Ref : https://docs.microsoft.com/en-us/azure/devops/pipelines/release/?view=azure-devops#how-do-i-manage-the-names-for-new-releases.