John L
John L

Reputation: 161

How to do an Automated build in TFS 2010 by a label

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?

Upvotes: 15

Views: 5483

Answers (3)

GoRoS
GoRoS

Reputation: 5375

@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

Upvotes: 3

Scott Bruns
Scott Bruns

Reputation: 1981

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.

Upvotes: 0

Dylan Smith
Dylan Smith

Reputation: 22245

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

Upvotes: 19

Related Questions