Custom TFS Enviroment Variable doesn't read $(Date)

前端 未结 3 1456
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-11 23:13

I want to use a custom tfs variable like this:

MergedVersion: $(BuildVersion.Major).$(BuildVersion.Minor).$(Date:yy)$(DayOfYear)$(Rev:.r)

My pro

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-11 23:36

    Building on top of @ChamindaC and @Andy Li-MSFT's answers, and using Peter Groenewegen's Xpirit Run Inline Powershell and Azure Powershell build extension, I was able to retrieve the $(rev:r) from the build number:

    In the following MSBuild task I reference that as $(Revision).

提交回复
热议问题