-
Notifications
You must be signed in to change notification settings - Fork 5
/
CI-build.msbuild
30 lines (27 loc) · 1.45 KB
/
CI-build.msbuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<ClassLibraryOutputDirectory>bin/$(Configuration)</ClassLibraryOutputDirectory>
<NUnitPath>packages/NUnit.Runners.2.6.1/tools</NUnitPath>
</PropertyGroup>
<Target Name="Clean">
<Exec Condition=" ('$(OS)' != 'Windows_NT') " Command="rm -r -f $(ClassLibraryOutputDirectory)" />
<Exec Condition=" ('$(OS)' == 'Windows_NT') " Command="del /q $(ClassLibraryOutputDirectory)" />
</Target>
<Target Name="Build" DependsOnTargets="Clean">
<Exec Condition=" ('$(OS)' != 'Windows_NT') " Command="sh nuget_install.sh" />
<Exec Condition=" ('$(OS)' == 'Windows_NT') " Command="nuget_install.bat" />
<MSBuild
Projects="Code2Xml.sln"
Targets="Build"
Properties="Configuration=$(Configuration);TrackFileAccess=false" />
</Target>
<Target Name="Test" DependsOnTargets="Build">
<CreateItem Include="$(ClassLibraryOutputDirectory)/*.Tests.dll">
<Output TaskParameter="Include" ItemName="TestAssembly" />
</CreateItem>
<Exec Condition=" ('$(OS)' != 'Windows_NT') " Command="mono --runtime=v4.0.30319 $(NUnitPath)/nunit-console.exe @(TestAssembly, ' ')" />
<Exec Condition=" ('$(OS)' == 'Windows_NT') " Command="$(NUnitPath)/nunit-console.exe @(TestAssembly, ' ')" />
</Target>
</Project>