forked from aspnet/Templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Templates.Settings.targets
216 lines (180 loc) · 15.4 KB
/
Templates.Settings.targets
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)\Templates.BranchSettings.targets" />
<Import Project="$(MSBuildThisFileDirectory)\tools\Common.tasks" />
<PropertyGroup>
<!-- If you build the project from the command prompt, use the TemplatesVSVersion environment variable. -->
<TemplatesTargetVersion Condition=" '$(TemplatesTargetVersion)' == '' ">$(TemplatesVSVersion)</TemplatesTargetVersion>
<!-- If you open VS directly from the Windows shell, use the VS version as the target version. -->
<TemplatesTargetVersion Condition=" '$(TemplatesTargetVersion)' == '' ">$(VisualStudioVersion)</TemplatesTargetVersion>
<!-- Usually these are environment variables, but they aren't set when running VS -->
<TemplatesRoot Condition=" '$(TemplatesRoot)' == '' ">$(MSBuildThisFileDirectory)</TemplatesRoot>
<TemplatesBin Condition=" '$(TemplatesBin)' == '' ">$(TemplatesRoot)artifacts\build</TemplatesBin>
<TemplatesIntermediate Condition=" '$(TemplatesIntermediate)' == '' ">$(TemplatesRoot)intermediate</TemplatesIntermediate>
<TemplatesSource Condition=" '$(TemplatesSource)' == '' ">$(TemplatesRoot)src</TemplatesSource>
<TemplatesTest Condition=" '$(TemplatesTest)' == '' ">$(TemplatesRoot)test</TemplatesTest>
<TemplatesTools Condition=" '$(TemplatesTools)' == '' ">$(TemplatesRoot)tools</TemplatesTools>
<TemplatesSetup Condition=" '$(TemplatesSetup)' == '' ">$(TemplatesRoot)setup</TemplatesSetup>
<TemplatesTestResults Condition=" '$(TemplatesTestResults)' == '' ">$(TemplatesRoot)TestResults</TemplatesTestResults>
</PropertyGroup>
<PropertyGroup>
<IsOfficialBuild Condition="'$(IsOfficialBuild)' == ''">false</IsOfficialBuild>
<TemplateVersion Condition="'$(TemplateVersion)' == ''">$(BUILD_NUMBER)</TemplateVersion>
<TemplateVersion Condition="'$(TemplateVersion)' == ''">Local</TemplateVersion>
<TemplateDropPath Condition="'$(DROP_SHARE)' != '' and '$(BUILD_NUMBER)' != ''">$(DROP_SHARE)\$(BUILD_NUMBER)</TemplateDropPath>
<TemplateDropPath Condition="'$(TemplateDropPath)' == ''">$(MSBuildThisFileDirectory)</TemplateDropPath>
<PackageType Condition="'$(TemplateBuildBranch)' == 'release'">$(ReleasePackageType)</PackageType>
<PackageType Condition="'$(TemplateBuildBranch)' == 'dev'">$(DevPackageType)</PackageType>
<SignedPackageSubPath>artifacts\Signed</SignedPackageSubPath>
<ExternalPackageSubPath>artifacts\coherence\ext</ExternalPackageSubPath>
<CoherenceDropFile>$(TemplatesBin)\Packages.source.txt</CoherenceDropFile>
<SemaphoreDropFile>$(TemplatesBin)\templates.sem</SemaphoreDropFile>
<RunTemplateUnitTests Condition="'$(RunTemplateUnitTests)' == ''">true</RunTemplateUnitTests>
<SkipCopyPackages Condition="'$(SkipCopyPackages)' == ''">true</SkipCopyPackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(TemplatesTargetVersion)' == '15.0' ">
<!-- Visual Studio 15 properties -->
<TemplatesTargetVersionPath>\dev15</TemplatesTargetVersionPath>
<VersionedReferencePath>Dev15</VersionedReferencePath>
<TargetVsVersion>VS15</TargetVsVersion>
</PropertyGroup>
<PropertyGroup>
<ApplicationInsightsPackageVersion Condition="'$(ApplicationInsightsPackageVersion)' == ''">2.0.0-beta1</ApplicationInsightsPackageVersion>
<DefaultNugetFeedSource Condition="'$(NugetFeedSource)' == ''">api.nuget.org=https://api.nuget.org/v3/index.json</DefaultNugetFeedSource>
<NugetFeedSource Condition="'$(NugetFeedSource)' == '' and '$(TemplateBuildBranch)' == 'release' and '$(ReleaseNugetFeedSource)' != ''">$(ReleaseNugetFeedSource)|$(DefaultNugetFeedSource)</NugetFeedSource>
<NugetFeedSource Condition="'$(NugetFeedSource)' == '' and '$(TemplateBuildBranch)' == 'dev' and '$(DevNugetFeedSource)' != ''">$(DevNugetFeedSource)|$(DefaultNugetFeedSource)</NugetFeedSource>
</PropertyGroup>
<PropertyGroup>
<!-- Output -->
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputPath>$(TemplatesBin)</OutputPath>
<IntermediateOutputPath>$(TemplatesIntermediate)</IntermediateOutputPath>
<BaseIntermediateOutputPath>$(TemplatesIntermediate)</BaseIntermediateOutputPath>
</PropertyGroup>
<Target Name="DeterminePackageVersions" DependsOnTargets="SetupPackageSource">
<ItemGroup Condition="'$(CoherencePackageSources)' != ''">
<WebSdkFile Include="$(WebSdkPackageSource)\Microsoft.NET.Sdk.Web.*.nupkg"
Exclude="$(WebSdkPackageSource)\Microsoft.NET.Sdk.Web.*.symbols.nupkg"/>
<NetStandardFile Include="$(PackageSourceExternal)\NETStandard.Library.*.nupkg"/>
<ScaffoldingToolsFile Include="$(ScaffoldingPackageSource)\Microsoft.VisualStudio.Web.CodeGeneration.Tools.*.nupkg"/>
<AspNetCorePatchFile Include="$(CoherencePatchDropPath)\Microsoft.AspNetCore.1.0.*.nupkg"/>
<AspNetCoreMvcPatchFile Include="$(CoherencePatchDropPath)\Microsoft.AspNetCore.Mvc.Abstractions.*.nupkg"/>
<AspNetCoreReleaseFile Include="$(PackageSource)\Microsoft.AspNetCore.Diagnostics.*.nupkg"/>
</ItemGroup>
<GetFileSemanticVersion Condition="'%(WebSdkFile.Identity)' != '' " Filename="%(WebSdkFile.Filename)">
<Output PropertyName="WebSdkSemanticVersion" TaskParameter="SemanticVersion"/>
</GetFileSemanticVersion>
<GetFileSemanticVersion Condition="'%(NetStandardFile.Identity)' != '' " Filename="%(NetStandardFile.Filename)">
<Output PropertyName="NetStandardSemanticVersion" TaskParameter="SemanticVersion"/>
</GetFileSemanticVersion>
<GetFileSemanticVersion Condition="'%(ScaffoldingToolsFile.Identity)' != '' " Filename="%(ScaffoldingToolsFile .Filename)">
<Output PropertyName="ScaffoldingSemanticVersion" TaskParameter="SemanticVersion"/>
</GetFileSemanticVersion>
<GetFileSemanticVersion Condition="'%(AspNetCorePatchFile.Identity)' != '' " Filename="%(AspNetCorePatchFile.Filename)">
<Output PropertyName="AspNetCorePatchSemanticVersion" TaskParameter="SemanticVersion"/>
</GetFileSemanticVersion>
<GetFileSemanticVersion Condition="'%(AspNetCoreMvcPatchFile.Identity)' != '' " Filename="%(AspNetCoreMvcPatchFile.Filename)">
<Output PropertyName="AspNetCoreMvcPatchSemanticVersion" TaskParameter="SemanticVersion"/>
</GetFileSemanticVersion>
<GetFileSemanticVersion Condition="'%(AspNetCoreReleaseFile.Identity)' != '' " Filename="%(AspNetCoreReleaseFile.Filename)">
<Output PropertyName="AspNetCoreReleaseSemanticVersion" TaskParameter="SemanticVersion"/>
</GetFileSemanticVersion>
<PropertyGroup>
<!-- The below is a fallback version for external non CI builds -->
<NetCoreSemanticVersion Condition="'$(PackageSourceExternal)' == ''"></NetCoreSemanticVersion>
<NetCorePlatformVersion Condition="'$(NetCorePlatformVersion)' == ''">1.0.3$(NetCoreSemanticVersion)</NetCorePlatformVersion>
<WebSdkSemanticVersion Condition="'$(PackageSourceExternal)' == ''">-*</WebSdkSemanticVersion>
<WebSdkVersion Condition="'$(WebSdkVersion)' == ''">1.0.0$(WebSdkSemanticVersion)</WebSdkVersion>
<NetStandardVersion Condition="'$(NetStandardVersion)' == ''">1.6</NetStandardVersion>
<NetStandardSemanticVersion Condition="'$(PackageSourceExternal)' == ''">-*</NetStandardSemanticVersion>
<NetStandardPlatformVersion Condition="'$(NetStandardPlatformVersion)' == ''">$(NetStandardVersion).0$(NetStandardSemanticVersion)</NetStandardPlatformVersion>
<ScaffoldingSemanticVersion Condition="'$(PackageSource)' == ''">-*</ScaffoldingSemanticVersion>
<ScaffoldingPackageVersion Condition="'$(ScaffoldingPackageVersion)' == ''">1.0.0$(ScaffoldingSemanticVersion)</ScaffoldingPackageVersion>
<AspNetCorePatchSemanticVersion Condition="'$(PackageSource)' == ''"></AspNetCorePatchSemanticVersion>
<AspNetCorePatchPackageVersion Condition="'$(AspNetCorePatchPackageVersion)' == ''">1.0.1$(AspNetCorePatchSemanticVersion)</AspNetCorePatchPackageVersion>
<AspNetCoreMvcPatchSemanticVersion Condition="'$(PackageSource)' == ''"></AspNetCoreMvcPatchSemanticVersion>
<AspNetCoreMvcPatchPackageVersion Condition="'$(AspNetCoreMvcPatchPackageVersion)' == ''">1.0.2$(AspNetCoreMvcPatchSemanticVersion)</AspNetCoreMvcPatchPackageVersion>
<AspNetCoreReleaseSemanticVersion Condition="'$(PackageSource)' == ''"></AspNetCoreReleaseSemanticVersion>
<AspNetCoreReleasePackageVersion Condition="'$(AspNetCoreReleasePackageVersion)' == ''">1.0.0$(AspNetCoreReleaseSemanticVersion)</AspNetCoreReleasePackageVersion>
</PropertyGroup>
<Message Text="NetCorePlatformVersion: $(NetCorePlatformVersion)"/>
<Message Text="WebSdkVersion: $(WebSdkVersion)"/>
<Message Text="NetStandardPlatformVersion: $(NetStandardPlatformVersion)"/>
<Message Text="AspNetCorePatchPackageVersion: $(AspNetCorePatchPackageVersion)"/>
<Message Text="AspNetCoreMvcPackageVersion: $(AspNetCoreMvcPatchPackageVersion)"/>
<Message Text="AspNetCoreReleasePackageVersion: $(AspNetCoreReleasePackageVersion)"/>
<Message Text="ScaffoldingPackageVersion: $(ScaffoldingPackageVersion)"/>
</Target>
<Target Name="SetupPackageSource">
<FindLatestDrop RootPath="$(CacheDropFolder)" SubFolder="Signed" Condition="'$(CacheDropPath)' == '' and '$(CacheDropFolder)' != ''">
<Output PropertyName="CacheDropSigned" TaskParameter="LatestSubFolderPath"/>
<Output PropertyName="CacheDropPath" TaskParameter="LatestRootPath"/>
</FindLatestDrop>
<GetPropertyFromSemaphore SemaphorePath="$(CacheDropPath)\aspnetcorelocalfeed.sem" PropertyName="CoherenceDropPath">
<Output PropertyName="CoherenceDropPath" TaskParameter="PropertyValue"/>
</GetPropertyFromSemaphore>
<GetPropertyFromSemaphore SemaphorePath="$(CacheDropPath)\aspnetcorelocalfeed.sem" PropertyName="CoherencePatchDropPath">
<Output PropertyName="CoherencePatchDropPath" TaskParameter="PropertyValue"/>
</GetPropertyFromSemaphore>
<GetPropertyFromSemaphore SemaphorePath="$(CacheDropPath)\aspnetcorelocalfeed.sem" PropertyName="WebSdkDropPath" Condition="'$(WebSdkDropPath)' == ''">
<Output PropertyName="WebSdkDropPath" TaskParameter="PropertyValue"/>
</GetPropertyFromSemaphore>
<GetPropertyFromSemaphore SemaphorePath="$(CacheDropPath)\aspnetcorelocalfeed.sem" PropertyName="Version">
<Output PropertyName="CacheVersion" TaskParameter="PropertyValue"/>
</GetPropertyFromSemaphore>
<GetPropertyFromSemaphore SemaphorePath="$(CacheDropPath)\aspnetcorelocalfeed.sem" PropertyName="CoherenceCodeGenerationPatchDropPath">
<Output PropertyName="CoherenceCodeGenerationPatchDropPath" TaskParameter="PropertyValue"/>
</GetPropertyFromSemaphore>
<PropertyGroup>
<PackageSource Condition="'$(CoherenceDropPath)' != ''">$(CoherenceDropPath)\$(SignedPackageSubPath)\$(PackageType)</PackageSource>
<PackageSourceExternal Condition="'$(CoherenceDropPath)' != ''">$(CoherenceDropPath)\$(ExternalPackageSubPath)</PackageSourceExternal>
<RemotePackageSource Condition="'$(TemplateBuildBranch)' == 'dev'">https://www.myget.org/F/aspnetvnext/api/v3/index.json</RemotePackageSource>
<RemotePackageSource Condition="'$(TemplateBuildBranch)' == 'release'">https://www.myget.org/F/aspnetrelease/api/v3/index.json</RemotePackageSource>
<CoherencePackageSources>$(TemplatesIntermediate)\CoherencePackages</CoherencePackageSources>
<WebSdkPackageSource Condition="'$(WebSdkDropPath)' != ''">$(WebSdkDropPath)\Signed</WebSdkPackageSource>
<ScaffoldingPackageSource Condition="'$(CoherenceCodeGenerationPatchDropPath)' != ''">$(CoherenceCodeGenerationPatchDropPath)</ScaffoldingPackageSource>
</PropertyGroup>
<GetPropertyFromSemaphore SemaphorePath="$(WebSdkDropPath)\web-sdk.sem" PropertyName="CoreSdkDropPath" Condition="'$(CoreSdkDropPath)' == ''">
<Output PropertyName="CoreSdkDropPath" TaskParameter="PropertyValue"/>
</GetPropertyFromSemaphore >
<GetPropertyFromSemaphore SemaphorePath="$(WebSdkDropPath)\web-sdk.sem" PropertyName="CoreSdkVersion" Condition="'$(CoreSdkVersion)' == ''">
<Output PropertyName="CoreSdkVersion" TaskParameter="PropertyValue"/>
</GetPropertyFromSemaphore >
<!-- Feeds related to Coherence-Signed depends on the remote stores -->
<ItemGroup>
<PackageSourceForRestore Include="$(CoherencePackageSources)" Condition="'$(PackageSource)' != ''"/>
<PackageSourceForRestore Include="$(WebSdkPackageSource)" Condition="'$(WebSdkPackageSource)' != ''"/>
<PackageSourceForRestore Include="$(ScaffoldingPackageSource)" Condition="'$(ScaffoldingPackageSource)' != ''"/>
<PackageSourceForRestore Include="$(AdditionalPackageSourceForRestore)" Condition="'$(AdditionalPackageSourceForRestore)' != ''"/>
<PackageSourceForRestore Include="https://api.nuget.org/v3/index.json"/>
</ItemGroup>
<PropertyGroup>
<_PackageSourceForRestore >@(PackageSourceForRestore->'-s %(Identity)')</_PackageSourceForRestore >
<PackageSourceForRestore >$(_PackageSourceForRestore.Replace(';', ' '))</PackageSourceForRestore >
<PackageSourceForRestore >$(PackageSourceForRestore) -f $(RemotePackageSource)</PackageSourceForRestore >
</PropertyGroup>
<Message Text="CacheDropPath: $(CacheDropPath)"/>
<Message Text="PackageSource: $(PackageSource)"/>
<Message Text="PackageSourceExternal: $(PackageSourceExternal)"/>
<Message Text="CoherencePackageSources: $(CoherencePackageSources)"/>
<Message Text="WebSdkPackageSource: $(WebSdkPackageSource)"/>
<Message Text="ScaffoldingPackageSource: $(ScaffoldingPackageSource)"/>
<Message Text="CoreSdkDropPath: $(CoreSdkDropPath)"/>
<Message Text="PackageSourceFoRestore: $(PackageSourceForRestore)"/>
</Target>
<Target Name="CopyPackagesForBuild" DependsOnTargets="SetupPackageSource" Condition="'$(CoherenceDropPath)' != '' and '$(SkipCopyPackages)' == 'false'">
<RemoveDir Directories="$(CoherencePackageSources)" />
<MakeDir Directories="$(CoherencePackageSources)" />
<!-- Copy Coherence packages locally to speed up restore -->
<ItemGroup>
<CoherencePackages Include="$(PackageSource)\*.*-preview2-final.nupkg;
$(PackageSourceExternal)\*.nupkg;
$(WebSdkPackageSource)\*.nupkg;
$(ScaffoldingPackageSource)\*.nupkg"
Exclude="$(WebSdkPackageSource)\*.symbols.nupkg"/>
<CoherencePackages Include="$(CoherencePatchDropPath)\*.nupkg"
Exclude="$(CoherencePatchDropPath)\*.*-preview2-update1.nupkg" />
</ItemGroup>
<Copy SourceFiles="@(CoherencePackages)" DestinationFolder="$(IntermediateOutputPath)\CoherencePackages" SkipUnchangedFiles="true" />
</Target>
</Project>