forked from dotnet/standard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.msbuild
47 lines (42 loc) · 2.19 KB
/
publish.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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<Import Project="dir.targets" />
<Import Project="$(PackagesDir)/$(FeedTasksPackage)/$(FeedTasksPackageVersion)/build/$(FeedTasksPackage).targets" />
<PropertyGroup>
<PublishPattern Condition="'$(PublishPattern)' == ''">$(PackageOutputRoot)**\*.nupkg</PublishPattern>
<SymbolsPackagesPattern>$(PackageOutputRoot)**\*.symbols.nupkg</SymbolsPackagesPattern>
<!-- The SignFiles target needs OutDir to be defined -->
<OutDir>$(PackageOutputRoot)</OutDir>
</PropertyGroup>
<ItemGroup>
<_PackagesToPublish Include="$(PublishPattern)" Exclude="$(SymbolsPackagesPattern)" />
<_SymbolsPackagesToPublish Include="$(SymbolsPackagesPattern)" Condition="'$(PublishSymbols)' == 'true'" />
</ItemGroup>
<Target Name="GetPackagesToSign">
<ItemGroup>
<FilesToSign Include="@(_PackagesToPublish)">
<Authenticode>NuGet</Authenticode>
</FilesToSign>
</ItemGroup>
<Message Importance="High" Text="Attempting to sign package '%(FilesToSign.Identity)'" />
</Target>
<Target Name="SignPackages"
Condition="'$(SkipSigning)' != 'true' and '$(SignType)' != 'public'"
DependsOnTargets="GetPackagesToSign;SignFiles">
</Target>
<Target Name="PublishToAzureBlobFeed">
<Error Condition="'@(_PackagesToPublish)'==''" Text="ItemsToPush for packages is empty." />
<PushToBlobFeed ExpectedFeedUrl="$(ExpectedFeedUrl)"
AccountKey="$(AccountKey)"
ItemsToPush="@(_PackagesToPublish)"
Overwrite="$(PublishOverwrite)" />
</Target>
<Target Name="PublishSymbolsToAzureBlobFeed">
<Error Condition="'@(_SymbolsPackagesToPublish)'==''" Text="ItemsToPush for packages is empty." />
<PushToBlobFeed ExpectedFeedUrl="$(ExpectedFeedUrl)"
AccountKey="$(AccountKey)"
ItemsToPush="@(_SymbolsPackagesToPublish)"
Overwrite="$(PublishOverwrite)" />
</Target>
</Project>