40 lines
1.6 KiB
XML
40 lines
1.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<Import Project="SimpleLog.Targets"/>
|
|
|
|
<PropertyGroup>
|
|
<DeploymentServer>tommymontgomery.com</DeploymentServer>
|
|
<UnitTestsDir>$(MSBuildProjectDirectory)\SimpleLog.Tests</UnitTestsDir>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="Deploy" DependsOnTargets="Clean">
|
|
<MSBuild Projects="SimpleLog\SimpleLog.csproj" Properties="Configuration=Release"/>
|
|
|
|
<Message Text="Running unit tests" Importance="High"/>
|
|
<CallTarget Targets="RunUnitTests"/>
|
|
<CallTarget Targets="CleanUnitTests"/>
|
|
|
|
<CreateItem Include="$(MSBuildProjectDirectory)\SimpleLog\bin\Release\*.*">
|
|
<Output TaskParameter="Include" ItemName="DeploymentFiles"/>
|
|
</CreateItem>
|
|
|
|
<Zip Files="@(DeploymentFiles)" ZipFileName="SimpleLog\bin\Release\SimpleLog.zip" WorkingDirectory="$(MSBuildProjectDirectory)\SimpleLog\bin\Release"/>
|
|
</Target>
|
|
|
|
<Target Name="BuildUnitTests">
|
|
<MSBuild Projects="SimpleLog.Tests\SimpleLog.Tests.csproj" Properties="Configuration=Release"/>
|
|
</Target>
|
|
|
|
<Target Name="RunUnitTests" DependsOnTargets="BuildUnitTests">
|
|
<CreateItem Include="$(UnitTestsDir)\bin\Release\*.Tests.dll">
|
|
<Output TaskParameter="Include" ItemName="UnitTestAssemblies"/>
|
|
</CreateItem>
|
|
<NUnit ToolPath="c:\code\nunit\bin" Assemblies="@(UnitTestAssemblies)" WorkingDirectory="$(MSBuildProjectDirectory)\SimpleLog.Tests\bin\Release"/>
|
|
</Target>
|
|
|
|
<Target Name="CleanUnitTests">
|
|
<RemoveDir Directories="$(UnitTestsDir)\bin;$(UnitTestsDir)\obj"/>
|
|
</Target>
|
|
|
|
</Project>
|