Build revision number
-
6. března 2012 8:32
Hi All!
On msdn (http://msdn.microsoft.com/en-us/library/hh190719.aspx) exists next:
$(Rev:.rr) - 2 - (The next build on this day will be 3, and so on.)
I create build like this:
$(BuildDefinitionName)$(Rev:.rrrr)
After run build was generated build number like this: 2.8.1.0001 and next 2.8.1.0002
This is a bug or an error on msdn?
Všechny reakce
-
6. března 2012 9:44
Aleksander,
It is obviously an error in the table on msdn. Based on the example that is being used: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r) they a showing a correct build name: DailyBuild_20090824.2
In your example you are using 4 fixed positions for the revision number and that is why you get 0001 and then with the following build the 0002
Please remember to mark the replies as answers if they help. --- Success, Damir
- Označen jako odpověď Alexandr ShamrayMVP 11. března 2012 14:32
-
6. března 2012 10:15
Hi, Damir
I change $(Rev:.rrrr) o $(Rev:.rr) and get next build 2.8.1.03 :)
As for me better when additional "r" increment revision (so this is a bug :)).
-
6. března 2012 10:34
Aleksander,
I am not sure what do you mean that this is a bug? Where? In MSDN? Or in the TFS Build?
If you look at the TFS Build and the definition of the Revision then is that a number of builds per day. And the notation that you use for it can be in different formats and that is what you specify by $(Rev:.r) or any number of "r" that you find useful.
So in your case you run the build for the third time but you also changed the notation to be written with minimum of two digits hence you get the 2.8.1.03
Please remember to mark the replies as answers if they help. --- Success, Damir
- Navržen jako odpověď John QiaoMicrosoft Contingent Staff, Moderator 8. března 2012 7:32
-
8. března 2012 7:42Moderátor
Hi Aleksander,
Thanks for your post.
For your scenario, Damir provided us the detailed explanation, have you took that?
As Damir said, that’s a print mistake in that document, if set the $(Rev:.rr), after build the version will be 02, next build will be 03. Of course, it will begin from 01.
John Qiao [MSFT]
MSDN Community Support | Feedback to us
-
11. března 2012 14:32
Hi, All!
As said microsoft connect - all works as designed: https://connect.microsoft.com/VisualStudio/feedback/details/729029/build-revision-number
So this is a bug on msdn.
- Označen jako odpověď Alexandr ShamrayMVP 11. března 2012 14:32