forked from andrewdavey/cassette
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.package.xml
85 lines (60 loc) · 3.06 KB
/
build.package.xml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<NugetOutputDir>build\nuget</NugetOutputDir>
</PropertyGroup>
<!-- Cassette.targets contains some helper tasks we'll use -->
<Import Project="Cassette.targets" />
<Target Name="Default" DependsOnTargets="NugetPack" />
<Target Name="Build">
<Delete Files="build\**\*.*" />
<!-- .NET 3.5 build -->
<MSBuild Projects="src\Cassette.sln"
Properties="Configuration=Release;Define=NET40" />
<Copy SourceFiles="license.txt"
DestinationFolder="build\net40"/>
<!-- .NET 4.0 build -->
<MSBuild Projects="src\Cassette.sln"
Properties="Configuration=ReleaseNET35;Define=NET35" />
<Copy SourceFiles="license.txt"
DestinationFolder="build\net35"/>
</Target>
<Target Name="Test" DependsOnTargets="Build">
<ItemGroup>
<!-- Test .NET 4.0 Projects -->
<TestProject Include="src\Cassette.UnitTests\bin\Release\Cassette.UnitTests.dll"/>
<TestProject Include="src\*\bin\Release\Cassette.*.UnitTests.dll"/>
<TestProject Include="src\Cassette.IntegrationTests\bin\Release\Cassette.IntegrationTests.dll"/>
<!-- Test .NET 3.5 Projects -->
<TestProject Include="src\Cassette.UnitTests\bin\ReleaseNET35\Cassette.UnitTests.dll"/>
<TestProject Include="src\*\bin\ReleaseNET35\Cassette.*.UnitTests.dll"/>
<TestProject Include="src\Cassette.IntegrationTests\bin\ReleaseNET35\Cassette.IntegrationTests.dll"/>
</ItemGroup>
<Exec Command="tools\xunit.console.clr4.x86.exe %(TestProject.Identity)" />
</Target>
<Target Name="NugetPack" DependsOnTargets="Build">
<ItemGroup>
<Nutrans Include="**\*.nutrans" />
<Nuspec Include="**\*.nuspec" Exclude="src\Cassette.Shared.nuspec;src\packages\**\*.nuspec" />
</ItemGroup>
<!-- Get the package version from Cassette.dll's AssemblyInformationalVersion attribute. -->
<GetAssemblyInformationalVersion Assembly="src\Cassette\bin\Release\NET40\Cassette.dll">
<Output PropertyName="Version" TaskParameter="Version" />
</GetAssemblyInformationalVersion>
<MakeDir Directories="$(NugetOutputDir)" />
<Delete Files="$(NugetOutputDir)\*.nupkg"/>
<!-- Transform Nuspecs -->
<TransformXmlHierarchy
Source="%(Nutrans.Identity)"
Destination="%(Nutrans.RecursiveDir)%(Nutrans.Filename).nuspec"
TaskPath="tools\Microsoft.Web.XmlTransform.dll"
/>
<Exec Command="src\.nuget\nuget.exe pack %(Nuspec.Identity) -Symbols -Version $(Version) -OutputDirectory $(NugetOutputDir)"/>
</Target>
<Target Name="NugetPush" DependsOnTargets="NugetPack">
<ItemGroup>
<Packages Include="$(NugetOutputDir)\*.nupkg" Exclude="$(NugetOutputDir)\*.symbols.nupkg"/>
</ItemGroup>
<Exec Command="src\.nuget\nuget push %(Packages.Identity)" />
</Target>
</Project>