chandu
chandu

Reputation: 385

TFS 2015 Build number in YY_week number_ day number format

I started creating TFS 2015 build ( vNext) definition file. For build number format currently I have

$(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)_$(Rev:r)

It gives as BuildName_2016.05.28_1

But, I wanted $(BuildDefinitionName)$(Year:yy).Week number.Day Number$(Rev:r)

In real for example : BuildName_16.21.6_1

Anyway I can achieve this Week number and Day number? So that I can use the same format for releases and version number.

Upvotes: 2

Views: 798

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51083

Unfortunately, there is no $(Week)variables just like $(Month) to use directly, so you have to add a custom variables to achieve weekly by yourself.

enter image description here

You may have to manually edit the value of week or write a PS script to achieve this. More details about how to manage Version Numbers, please refer this blog.

Upvotes: 2

Related Questions