forked from aliostad/SuperBenchmarker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SuperBenchmarker.msbuild
49 lines (44 loc) · 2.23 KB
/
SuperBenchmarker.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0"
DefaultTargets="Default">
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<SolutionDir Condition=" '$(SolutionDir)' == ''">$(MSBuildThisFileDirectory)</SolutionDir>
</PropertyGroup>
<ItemGroup>
<BuildArtifactsDir Include=".\artifacts\" />
<PackageOutputDir Include=".\artifacts\packages" />
<Solutionfile Include=".\SuperBenchmarker.sln" />
<AppProjFiles Include=".\src\**\*.csproj" />
<TestProjFiles Include=".\test\**\*.csproj" />
<ScriptsDir Include=".\scripts\" />
<NugetExeDir Include=".\.nuget\" />
</ItemGroup>
<Target Name="Default" DependsOnTargets="Compile; CopyConfig; IlMerge; Package" />
<Target Name="DefaultCI" DependsOnTargets="Compile; CopyConfig; IlMerge; Package; Publish" />
<Target Name="Clean">
<RemoveDir Directories="@(BuildArtifactsDir)" />
</Target>
<Target Name="Init" DependsOnTargets="Clean">
<MakeDir Directories="@(BuildArtifactsDir);@(PackageOutputDir)" />
</Target>
<Target Name="Compile" DependsOnTargets="Init">
<MSBuild Projects="@(AppProjFiles)" Targets="Rebuild" Properties="OutDir=%(BuildArtifactsDir.FullPath);Configuration=$(Configuration);SolutionDir=$(SolutionDir)" />
</Target>
<Target Name="IlMerge">
<Exec WorkingDirectory="$(SolutionDir)" Command="tools\ilmerge.exe /target:exe /out:download\sb.exe /targetplatform:v4,C:\Windows\Microsoft.NET\Framework\v4.0.30319 artifacts\sb.exe artifacts\CommandLine.dll artifacts\Newtonsoft.Json.dll artifacts\System.Net.Http.Formatting.dll artifacts\RandomGen.dll" />
</Target>
<Target Name="CopyConfig">
<Copy
SourceFiles="%(BuildArtifactsDir.FullPath)\sb.exe.config"
DestinationFolder="$(SolutionDir)\download"
/>
</Target>
<Target Name="Package">
<Exec WorkingDirectory="%(NugetExeDir.FullPath)" Command="nuget.exe pack ..\src\SuperBenchmarker\SuperBenchmarker.nuspec -OutputDirectory ..\artifacts\packages" />
</Target>
<Target Name="Publish">
<Exec WorkingDirectory="%(ScriptsDir.FullPath)" Command="powershell -file .\publish.ps1" />
</Target>
</Project>