Is there a well-known practice for having multiple build types (in Team
Build 2008) use a common project file, but still be parameterized in various
ways?
I've been a little frustrated that you can't specify msbuild command line
flags in a build definition (like /property, for instance.)
To compensate, here is what I've done...
I've defined an item group as follows at the top of my tfsbuild.proj, where
the identity of each item correspond to the name of a build definition.
Each item has some set of metadata that you want to use in parameterizing
the build.
<ItemGroup>
<BuildType Include="Dev_Core">
<SomeProp>Foo</SomeProp>
<BranchToBuild>DevRefactor</BranchToBuild>
<BaseBuildName>1.6</BaseBuildName>
</BuildType>
<BuildType Include="QA_Coret">
<SomeProp>Foo</SomeProp>
<BranchToBuild>DevRefactor</BranchToBuild>
<BaseBuildName>1.6</BaseBuildName>
</BuildType>
</ItemGroup>
Then, I override BeforeEndToEndIteration (so BuildDefinitionName is defined)
and I do the following:
<Target Name="BeforeEndToEndIteration">
<CreateProperty Value="%(BuildType.SomeProp)"
Condition="'%(BuildType.Identity)'==$(BuildDefinitionName)">
<Output TaskParameter="Value" PropertyName="SomeProp" />
</CreateProperty>
<CreateProperty Value="%(BuildType.BranchToBuild)"
Condition="'%(BuildType.Identity)'==$(BuildDefinitionName)">
<Output TaskParameter="Value" PropertyName="BranchToBuild" />
</CreateProperty>
<CreateProperty Value="%(BuildType.BaseBuildName)"
Condition="'%(BuildType.Identity)'==$(BuildDefinitionName)">
<Output TaskParameter="Value" PropertyName="BaseBuildName" />
</CreateProperty>
....
</Target>
Does this seem reasonable? Do other folks have a better solution ?
--
scott colestock
trace ventures, LLC
612.559.0580
OzTFS.com - to unsubscribe from this list, send a message back to the list with
'unsubscribe' as the subject. View the web archives at
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net