This repository has been archived by the owner on Jul 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuild.msbuild
67 lines (58 loc) · 2.94 KB
/
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
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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0"
DefaultTargets="Run"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Build flags -->
<ShouldClean>true</ShouldClean>
<ShouldHaveCoverage>true</ShouldHaveCoverage>
<ShouldCleanPackages>false</ShouldCleanPackages>
<!-- Build configuration -->
<Platform Condition=" '$(Platform)' == ''">Any CPU</Platform>
<!-- Directories -->
<DirWorkspace>$(MSBuildProjectDirectory)</DirWorkspace>
</PropertyGroup>
<Target Name="Run" DependsOnTargets="_PrepareWorkspace;_GatherReleaseNotes;_BuildBinaries;_ExecuteUnitTests;_PackageNuget">
<!-- Do nothing here -->
</Target>
<!-- Display info -->
<Target Name="_DisplayInfo">
<Message Text="Building Nuclei ..." />
</Target>
<!-- Clean -->
<PropertyGroup>
<MsBuildPrepareWorkspace>$(DirWorkspace)\Build.PrepareWorkspace.msbuild</MsBuildPrepareWorkspace>
</PropertyGroup>
<Target Name="_PrepareWorkspace" DependsOnTargets="_DisplayInfo">
<MSBuild Projects="$(MsBuildPrepareWorkspace)" Properties="ShouldClean=$(ShouldClean);ShouldCleanPackages=$(ShouldCleanPackages)" />
</Target>
<!-- Gather release notes -->
<PropertyGroup>
<MsBuildGatherReleaseNotes>$(DirWorkspace)\Build.GatherReleaseNotes.msbuild</MsBuildGatherReleaseNotes>
</PropertyGroup>
<Target Name="_GatherReleaseNotes" DependsOnTargets="_PrepareWorkspace">
<MSBuild Projects="$(MsBuildGatherReleaseNotes)" Properties="ShouldClean=$(ShouldClean);ShouldCleanPackages=$(ShouldCleanPackages)" />
</Target>
<!-- Build binaries -->
<PropertyGroup>
<MsBuildBuildBinaries>$(DirWorkspace)\Build.Binaries.msbuild</MsBuildBuildBinaries>
</PropertyGroup>
<Target Name="_BuildBinaries" DependsOnTargets="_GatherReleaseNotes">
<MSBuild Projects="$(MsBuildBuildBinaries)" Properties="Configuration=Release;Platform=$(Platform)" />
<MSBuild Projects="$(MsBuildBuildBinaries)" Properties="Configuration=Deploy;Platform=$(Platform)" />
</Target>
<!-- Run unit tests -->
<PropertyGroup>
<MsBuildExecuteUnitTest>$(DirWorkspace)\Build.Test.Unit.msbuild</MsBuildExecuteUnitTest>
</PropertyGroup>
<Target Name="_ExecuteUnitTests" DependsOnTargets="_BuildBinaries">
<MSBuild Projects="$(MsBuildExecuteUnitTest)" Properties="ShouldHaveCoverage=$(ShouldHaveCoverage)" />
</Target>
<!-- Build NuGet files -->
<PropertyGroup>
<MsBuildPackageNuGet>$(DirWorkspace)\Build.Package.NuGet.msbuild</MsBuildPackageNuGet>
</PropertyGroup>
<Target Name="_PackageNuget" DependsOnTargets="_BuildBinaries">
<MSBuild Projects="$(MsBuildPackageNuGet)" Properties="Configuration=Deploy;Platform=$(Platform)" />
</Target>
</Project>