Reputation: 175593
While setting up CruiseControl, I added a buildpublisher block to the publisher tasks:
<buildpublisher>
<sourceDir>C:\MyBuild\</sourceDir>
<publishDir>C:\MyBuildPublished\</publishDir>
<alwaysPublish>false</alwaysPublish>
</buildpublisher>
This works, but it copies the entire file contents of the build, I only want to copy the DLL's and .aspx pages, I don't need the source code to get published.
Does anyone know of a way to filter this, or do I need to setup a task to run a RoboCopy script instead?
Upvotes: 9
Views: 4986
Reputation: 1465
I'm not sure with a web project, but for our winforms app, you can grab the TargetOutputs from the MSBuild task like so:
<MSBuild Projects="@(VSProjects)"
Properties="Configuration=$(Configuration)">
<Output TaskParameter="TargetOutputs" ItemName="BuildTargetOutputs"/>
</MSBuild>
and then do a copy:
<Copy SourceFiles="@(BuildTargetOutputs)"
DestinationFolder="bin"
SkipUnchangedFiles="true" />
Not sure what the TargetOutputs are for a web project, but for winforms and class libraries, it's the .dll or .exe.
Upvotes: 1
Reputation: 42516
The default build publisher in CC.NET does not provide a way to do this. You have a few options:
Upvotes: 0
Reputation: 15568
I set up a task to do this. I'm not aware of any way to make CruiseControl be that specific. I usually just chain a batch file to do the copy to the CC.net task.
Upvotes: 3