Adding testing and source zip to build

Failed test will stop the build. Results are in build\OrchardTests.xml.
Source zip should be able to open and run in visual studio.

--HG--
branch : dev
This commit is contained in:
Louis DeJardin 2010-02-06 21:20:38 -08:00
parent fd270f666c
commit c5f70ca998

View File

@ -20,6 +20,7 @@
<Target Name ="Build"> <Target Name ="Build">
<CallTarget Targets="Clean"/> <CallTarget Targets="Clean"/>
<CallTarget Targets="Compile"/> <CallTarget Targets="Compile"/>
<CallTarget Targets="Test"/>
<CallTarget Targets="Package"/> <CallTarget Targets="Package"/>
</Target> </Target>
@ -44,6 +45,13 @@
</Target> </Target>
<!-- Testing -->
<Target Name ="Test">
<Exec Command="$(LibFolder)\nunit\nunit-console-x86.exe /xml=$(BuildFolder)\Orchard.Tests.xml $(CompileFolder)\Orchard.Core.Tests.dll $(CompileFolder)\Orchard.Tests.dll $(CompileFolder)\Orchard.Tests.Packages.dll $(CompileFolder)\Orchard.Web.Tests.dll" />
</Target>
<!-- Packaging --> <!-- Packaging -->
<Target Name="Package-Stage"> <Target Name="Package-Stage">
@ -53,20 +61,40 @@
<Stage-Web Include="$(WebSitesFolder)\Orchard.Web\**\*" /> <Stage-Web Include="$(WebSitesFolder)\Orchard.Web\**\*" />
<Stage-Core Include="$(WebSitesFolder)\Orchard.Core\**\*" Exclude="@(Stage-Bin-Exclude)" /> <Stage-Core Include="$(WebSitesFolder)\Orchard.Core\**\*" Exclude="@(Stage-Bin-Exclude)" />
<Stage-Packages Include="$(WebSitesFolder)\**\*" Exclude="@(Stage-Web);@(Stage-Core);@(Stage-Bin-Exclude)" /> <Stage-Packages Include="$(WebSitesFolder)\**\*" Exclude="@(Stage-Web);@(Stage-Core);@(Stage-Bin-Exclude)" />
<Stage-License Include="$(MSBuildProjectDirectory)\*.txt" />
</ItemGroup> </ItemGroup>
<Copy SourceFiles="@(Stage-Web)" DestinationFolder="$(StageFolder)\%(RecursiveDir)" /> <Copy SourceFiles="@(Stage-Web);@(Stage-License)" DestinationFolder="$(StageFolder)\%(RecursiveDir)" />
<Copy SourceFiles="@(Stage-Core)" DestinationFolder="$(StageFolder)\Core\%(RecursiveDir)" /> <Copy SourceFiles="@(Stage-Core)" DestinationFolder="$(StageFolder)\Core\%(RecursiveDir)" />
<Copy SourceFiles="@(Stage-Packages)" DestinationFolder="$(StageFolder)\Packages\%(RecursiveDir)" /> <Copy SourceFiles="@(Stage-Packages)" DestinationFolder="$(StageFolder)\Packages\%(RecursiveDir)" />
</Target> </Target>
<Target Name="Package-Zip"> <Target Name="Package-Zip">
<ItemGroup> <ItemGroup>
<Zip-Exclude Include="
$(MSBuildProjectDirectory)\src\**\bin\**\*;
$(MSBuildProjectDirectory)\src\**\obj\**\*;
$(MSBuildProjectDirectory)\**\App_Data\**\*;
$(MSBuildProjectDirectory)\**\_ReSharper*\**\*;
$(MSBuildProjectDirectory)\**\*.sln.cache;
$(MSBuildProjectDirectory)\**\*.suo;
$(MSBuildProjectDirectory)\**\*.user;
$(MSBuildProjectDirectory)\**\*.patch;
$(MSBuildProjectDirectory)\**\*.hg;
" />
<Zip-Stage Include="$(StageFolder)\**\*" /> <Zip-Stage Include="$(StageFolder)\**\*" />
<Zip-Source Include="
$(MSBuildProjectDirectory)\lib\**\*;
$(MSBuildProjectDirectory)\src\**\*;
$(MSBuildProjectDirectory)\*.txt;
" Exclude="@(Zip-Exclude)" />
</ItemGroup> </ItemGroup>
<Zip Files="@(Zip-Stage)" WorkingDirectory="$(StageFolder)" ZipFileName="$(BuildFolder)\Orchard.Web.zip" /> <Zip Files="@(Zip-Stage)" WorkingDirectory="$(StageFolder)" ZipFileName="$(BuildFolder)\Orchard.Web.zip" />
<Zip Files="@(Zip-Source)" WorkingDirectory="$(MSBuildProjectDirectory)" ZipFileName="$(BuildFolder)\Orchard.Source.zip" />
</Target> </Target>
</Project> </Project>