-2

We'd like to increment the minor version of our application each time we create a new branch for release. So if, for example, the current version is 4.17 the next branch we create would automatically increment the version number to 4.18.

Our scheme is that the code follows the following path:

Dev -> Test -> Staging

so that the testing happens on code we think has the functionality required and only that code that passes testing is available for release.

Then when the time comes for a new release we take a new branch of Staging, so we have the following structure:

Staging
   |----> Release 4.1
   |----> Release 4.2
   ...
   |----> Release 4.17

There is no cross pollination between the release branches.

So what we need is something that will increment the minor version number when a new branch is taken. We can reset the version number of the application in Dev/Test/Staging to anything that needed for this to work.

Is this possible with TFS/VS 2013 out of the box?

jessehouwing
  • 87,636
  • 19
  • 214
  • 286
ChrisF
  • 127,439
  • 29
  • 243
  • 315
  • @Kiquenet - no, there's no final solution and the problem has been put on hold for the time being as it's not too onerous to do this manually. – ChrisF Dec 03 '14 at 08:46

2 Answers2

0

That is a bad smell! You have to do that on one branch, and no in all... And not change the assembly number in a manual way...

The TFS Versioning could help you to do this.

egomesbrandao
  • 788
  • 6
  • 16
0

In the community build tools you will find an activity called TFS Version. This tool can, in its default configuration, strip the version number from the build name. If you name your build for the branch to be mybuild_7.8.0$(.r) the tool can be configured to pick up that version and store it in a variable. You can then use that variable to update the AsemblyInfo.* file versions.

This is the correct way to do what you are asking. Do not check the changes in, and indeed set the checked in numbers to be 0.0.0.0. This way you will be able to identify when a cheeky developer has done a local push and when it came from a build server

  • 1
    "The TFSVersion activity can be used to set the version number of **some** or all of the assemblies being built in a TFS build." (my emphasis) - now that sounds interesting. – ChrisF Jun 05 '14 at 16:27
  • Using the one from the community build tool you just pass a regular expression pattern match. So 'some' or all also applies... – MrHinsh - Martin Hinshelwood Jun 06 '14 at 09:09