forked from dotnet/machinelearning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.proj
33 lines (26 loc) · 1.57 KB
/
publish.proj
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
<Project DefaultTargets="Publish" >
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" />
<PropertyGroup>
<PublishSymbolsPackage>Microsoft.SymbolUploader.Build.Task</PublishSymbolsPackage>
<EnablePublishSymbols>false</EnablePublishSymbols>
</PropertyGroup>
<Import Project="$(PackagesDir)\$(PublishSymbolsPackage.ToLower())\$(PublishSymbolsPackageVersion)\build\PublishSymbols.targets" />
<Target Name="Publish" Condition="'$(EnablePublishSymbols)'=='true'" DependsOnTargets="SetupPublishSymbols">
<Message Text="Attempting to Publish Symbols" />
<Error Condition="!Exists('$(PackageOutputPath)')" Text="'PackageOutputPath' folder '$(PackageOutputPath)' does not exist."/>
<Error Condition="'$(SymbolServerPath)'==''" Text="Missing property SymbolServerPath" />
<Error Condition="'$(SymbolServerPAT)'==''" Text="Missing property SymbolServerPAT" />
<CallTarget Targets="PublishSymbols" />
</Target>
<Target Name="SetupPublishSymbols">
<PropertyGroup>
<SymbolExpirationInDays Condition="'$(SymbolExpirationInDays)'=='' and '$(SymbolExpirationDate)'==''">1</SymbolExpirationInDays>
<ConvertPortablePdbsToWindowsPdbs>true</ConvertPortablePdbsToWindowsPdbs>
</PropertyGroup>
<ItemGroup>
<SymbolPackagesToPublish Include="$(PackageOutputPath)**\*.symbols.*nupkg" />
</ItemGroup>
<Message Importance="High" Text="Publishing @(SymbolPackagesToPublish) to $(SymbolServerPath)"/>
<Error Condition="'@(SymbolPackagesToPublish)'==''" Text="There are no symbol nuget packages to publish" />
</Target>
</Project>