15

I have my automated builds working but I want to be able to go back to a specifc labeled version and build from that source. The build definition under "Process" has the item "Get Version" but this is for a specific changeset which seems fairly useless. Does anyone have any idea how I would go about doing this?

Dylan Smith
  • 22,069
  • 2
  • 47
  • 62
John L
  • 161
  • 1
  • 3

3 Answers3

19

The Get Version accepts what TFS calls an versionspec which can be either a changeset or a label. To specify a label just prefix it with an L.

LMyLabel

Dylan Smith
  • 22,069
  • 2
  • 47
  • 62
3

@Dylan Smith: Is right. You can specify in the advanced Get Version parameter the label by: LmyLabel or CmyChangeset in order to queue a specific version. There are other options like date, "W" (Version last fetched to your workspace), or "T" (latest version) as well.

For more information: Building a Specific Version with Team Build 2008

GoRoS
  • 5,183
  • 2
  • 43
  • 66
0

During your build process, label the code (In my case I use the build number as part of the label).

Then when you want to build a specific labeled version, pass the label to the build script, get the code from the library by label, build the code, and deploy.

See http://msdn.microsoft.com/en-us/library/fx7sdeyf.aspx for how to get a labeled version.

Scott Bruns
  • 1,971
  • 12
  • 12