forked from aspnet/Templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Templates.msbuild
51 lines (46 loc) · 2.54 KB
/
Templates.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
<Project DefaultTargets="Verify" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)\Templates.Settings.targets" />
<Import Project="$(MSBuildThisFileDirectory)\tools\Build.tasks" />
<Target Name="Verify" DependsOnTargets="Build;WriteDropFile"/>
<Target Name="VerifyTemplates" DependsOnTargets="Build">
<ItemGroup>
<ProjectsToTest Include="test\VerifyTemplates.csproj"/>
</ItemGroup>
<MSBuild Projects="@(ProjectsToTest)" Targets="Verify" BuildInParallel="true" Properties="Configuration=$(Configuration);CoherenceDropPath=$(CoherenceDropPath);WebSdkDropPath=$(WebSdkDropPath)"/>
</Target>
<Target Name="UnitTest" DependsOnTargets="SetupPackageSource" Condition="'$(RunTemplateUnitTests)' == 'true'">
<Exec Command="test\runTests.cmd $(PackageSourceForRestore)"/>
</Target>
<Target Name="WriteDropFile" DependsOnTargets="DeterminePackageVersions" Condition="'$(IsOfficialBuild)' == 'true'">
<ItemGroup>
<LinesToWrite Include="$(PackageSource)"/>
<LinesToWrite Include="$(PackageSourceExternal)"/>
<LinesToWrite Include="$(WebSdkPackageSource)"/>
<LinesToWrite Include="$(CoreSdkDropPath)"/>
<LinesToWrite Include="$(CacheDropPath)"/>
<LinesToWrite Include="$(ScaffoldingPackageSource)"/>
<LinesToWrite Include="Template Version: $(TemplateBuildBranch):$(TemplateVersion)"/>
</ItemGroup>
<WriteLinesToFile File="$(CoherenceDropFile)" Lines="@(LinesToWrite)" Overwrite="True"/>
<GenerateSemaphore
TemplateVersion="$(TemplateVersion)"
TemplateDropPath="$(TemplateDropPath)"
CacheVersion="$(CacheVersion)"
CacheDropPath="$(CacheDropPath)"
WebSdkVersion="$(WebSdkVersion)"
WebSdkDropPath="$(WebSdkPackageSource)"
CoreSdkVersion="$(CoreSdkVersion)"
CoreSdkDropPath="$(CoreSdkDropPath)"
ScaffoldingVersion="$(ScaffoldingPackageVersion)"
ScaffoldingDropPath="$(ScaffoldingPackageSource)"
SemaphoreFilePath="$(SemaphoreDropFile)"/>
</Target>
<Target Name="Build" DependsOnTargets="CopyPackagesForBuild">
<ItemGroup>
<ProjectsToBuild Include="dirs.proj"/>
</ItemGroup>
<Message Text="Coherence Build = '$(CoherenceBuildNumber)'" Condition="'$(CoherenceBuildNumber)' != ''"/>
<MakeDir Directories="$(TemplatesBin)"/>
<MSBuild Projects="@(ProjectsToBuild)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);CoherenceDropPath=$(CoherenceDropPath);WebSdkDropPath=$(WebSdkDropPath)"/>
</Target>
</Project>