-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBuild.proj
38 lines (33 loc) · 1.62 KB
/
Build.proj
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
<Project DefaultTargets="Clean;Build;NuGet;WiX" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Use Visual Studio Team Services BuildID if available (defaults to 0) -->
<BuildNumber>$(%BUILD_BUILDID)</BuildNumber>
<BuildNumber Condition=" $(BuildNumber) == '' ">0</BuildNumber>
<!-- <PreRelease>-beta</PreRelease> -->
<PreRelease></PreRelease>
</PropertyGroup>
<PropertyGroup>
<NUSpecFile>package\NUnitTDNet.nuspec</NUSpecFile>
<SolutionFile>src\NUnitTDNetAdapter.sln</SolutionFile>
<Version>3.5.0</Version>
<PackagesPath>$(MSBuildProjectDirectory)\src\packages</PackagesPath>
<OutputPath>$(MSBuildProjectDirectory)\build</OutputPath>
<Properties>Version=$(Version);BuildNumber=$(BuildNumber);PreRelease=$(PreRelease);PackagesPath=$(PackagesPath);OutputPath=$(OutputPath)</Properties>
</PropertyGroup>
<ItemGroup>
<Wxs Include="package\NUnitTDNet.wxs" />
</ItemGroup>
<Target Name="Clean">
<RemoveDir Directories="$(OutputPath)" />
<MSBuild Projects="$(SolutionFile)" Targets="Clean" Properties="$(Properties)" />
</Target>
<Target Name="Build">
<MSBuild Projects="$(SolutionFile)" Properties="$(Properties)" />
</Target>
<Target Name="NuGet">
<Exec WorkingDirectory="." Command="nuget pack $(NUSpecFile) -BasePath . -OutputDirectory $(OutputPath) -Properties $(Properties)" />
</Target>
<Target Name="WiX">
<Exec Command='candle "@(Wxs)" -out "$(OutputPath)\%(Wxs.Filename).wixobj" -dVersion=$(Version) -dBuildNumber=$(BuildNumber) -dPreRelease=$(PreRelease) -dPackagesPath=$(PackagesPath) -dOutputPath=$(OutputPath)' />
</Target>
</Project>