forked from aspnet/LibraryManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLibraryManager.msbuild
114 lines (105 loc) · 4.73 KB
/
LibraryManager.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Directory.Build.props" />
<Import Project="tools\ShimGenerator\ShimGenerator.targets" />
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<LibManSrc>$(RepoRoot)\src\</LibManSrc>
<LibManTest>$(RepoRoot)\test\</LibManTest>
<LibManArtifactsDir>$(RepoRoot)\artifacts\</LibManArtifactsDir>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<BaseOutputPath>$(RepoRoot)\bin\</BaseOutputPath>
<BaseIntermediateOutputPath>$(RepoRoot)\obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<SolutionToBuild Include="LibraryManager.sln" />
<CommonProjects Include="$(LibManSrc)LibraryManager\Microsoft.Web.LibraryManager.csproj" />
<CommonProjects Include="$(LibManSrc)LibraryManager.Contracts\Microsoft.Web.LibraryManager.Contracts.csproj" />
<VSIXProject Include="@(CommonProjects)" />
<VSIXProject Include="$(LibManSrc)LibraryManager.Vsix\Microsoft.Web.LibraryManager.Vsix.csproj" />
<LibraryManagerBuildProject Include="@(CommonProjects)" />
<LibraryManagerBuildProject Include="$(LibManSrc)LibraryManager.Build\Microsoft.Web.LibraryManager.Build.csproj" />
<GlobalToolProject Include="$(LibmanSrc)libman\libman.csproj" />
</ItemGroup>
<!--
***********************************************************
Build the RepoTasks project and publishes the output task
dll to $(RepoTasksPublishDir)
***********************************************************
-->
<Target Name="BuildRepoTasks" Condition="Exists('$(RepoTasksDir)RepoTasks.csproj')">
<MSBuild Projects="$(RepoTasksDir)/RepoTasks.csproj"
Targets="Restore;Build;Publish"
Properties="PublishDir=$(RepoTasksPublishDir)"
BuildInParallel="False" />
</Target>
<!--
*******************************************************************
Restores all projects in the repository
*******************************************************************
-->
<Target Name="Restore">
<MSBuild Projects="@(SolutionToBuild)"
Targets="Restore"
Properties="Configuration=$(Configuration);"/>
</Target>
<!-- Build VSIX -->
<Target Name="BuildVSIX" DependsOnTargets="Restore">
<MSBuild Projects="@(VSIXProject)"
Targets="Build"
Properties="Configuration=$(Configuration);"/>
</Target>
<!-- Build the MsBuild package -->
<Target Name="BuildLibraryManagerBuild" DependsOnTargets="Restore">
<MSBuild Projects="@(LibraryManagerBuildProject)"
Targets="Build"
Properties="Configuration=$(Configuration);"/>
</Target>
<!--
***********************************************************
Publish the global tool.
***********************************************************
-->
<Target Name="PublishTool">
<MSBuild Targets="Restore;Build;Publish"
Projects="@(GlobalToolProject)"
Properties="Configuration=$(Configuration);
PublishDir=$(ToolPublishDir);"
BuildInParallel="false" />
</Target>
<!--
***********************************************************
Package the global tool along with the Shims.
***********************************************************
-->
<Target Name="PackGlobalTool" DependsOnTargets="BuildRepoTasks;PublishTool;GenerateShims">
<MSBuild Targets="Pack"
Projects="@(GlobalToolProject)"
Properties="IncludeBuildOutput=false;
PublishDir=$(ToolPublishDir);
PackageLicenseUrl=$(PackageLicenseUrl);
PackageProjectUrl=$(PackageProjectUrl);
Copyright=$(Copyright);
Description=$(Description);
RepositoryUrl=$(RepositoryUrl);
Serviceable=true;
PackageOutputPath=$(LibmanArtifactsDir)$(Configuration)\" />
<!--
RepositoryCommit=$(RepositoryCommit);
PackageVersion=$(PackageVersion); -->
</Target>
<!--
************************************************************
Build the test projects.
************************************************************
-->
<Target Name="BuildTestProjects">
<ItemGroup>
<TestProjects Include="$(RepoRoot)\test\**\*.csproj" />
<TestProjects Remove="$(RepoRoot)\test\LibraryManager.IntegrationTest\TestSolution\**\*.csproj" />
</ItemGroup>
<MSBuild Targets="Build"
Projects="@(TestProjects)"
Properties="Configuration=$(Configuration);" />
</Target>
<Target Name="BuildAll" DependsOnTargets="BuildLibraryManagerBuild;BuildVSIX;PackGlobalTool;BuildTestProjects" />
</Project>