Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build Number Format, four digit revision number

Tags:

build

tfs

Is there a way of formatting the revision in a Build Number Format to always be three digits long starting from 1000?

I have $(Rev:.r) which adds .1 and .2 to concurrent builds.

I want this to be .1001

This is TFS 2013.

I have tried .1rrr and get the exception

Exception Message: Unable to expand the macro $(Rev:.1rrr) specified in build number format

like image 278
kidshaw Avatar asked Nov 20 '25 21:11

kidshaw


1 Answers

Use the following:

$(Rev:.1rrr)

(Tested on VS Online)

The caveat here is that this won't rollover to 2000 if you are doing more than 999 builds in a day.

like image 129
Pero P. Avatar answered Nov 24 '25 04:11

Pero P.