Skip to content

Commit

Permalink
Merge pull request dotnet#2755 from StephenBonikowsky/stebon/master/P…
Browse files Browse the repository at this point in the history
…ackageSigning

Enable package signing
  • Loading branch information
StephenBonikowsky authored Apr 12, 2018
2 parents 67ea4b8 + b7eb152 commit b87001e
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/publish.proj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?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="$(ToolsDir)PublishContent.targets" />
<Import Project="$(ToolsDir)versioning.targets" />
<Import Project="$(PackagesDir)/$(FeedTasksPackage.ToLower())/$(FeedTasksPackageVersion)/build/$(FeedTasksPackage).targets" />

<PropertyGroup>
Expand Down Expand Up @@ -31,8 +31,24 @@
<FinalPublishPattern>$(PackageDownloadDirectory)\**\*.nupkg</FinalPublishPattern>
<FinalPublishPrivatePattern>$(PackageDownloadDirectory)\**\*Private*.nupkg</FinalPublishPrivatePattern>
<FinalSymbolsPackagesPattern>$(PackageDownloadDirectory)\**\*.symbols.nupkg</FinalSymbolsPackagesPattern>
<!-- The SignFiles target needs OutDir to be defined -->
<OutDir>$(PackageDownloadDirectory)</OutDir>
</PropertyGroup>

<Target Name="GetPackagesToSign">
<ItemGroup>
<FilesToSign Include="$(FinalPublishPattern)" Exclude="$(FinalPublishPrivatePattern);$(FinalSymbolsPackagesPattern)">
<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">
<ItemGroup>
<ItemsToPush Include="$(FinalPublishPrivatePattern)" Exclude="$(FinalSymbolsPackagesPattern)">
Expand Down

0 comments on commit b87001e

Please sign in to comment.