From 9f25daa059a3eed1ea1eb06605be90cd84d3ebe1 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Tue, 22 May 2018 15:34:21 -0700 Subject: [PATCH] Added logic to create signing XML for NuGet packages (#6921) --- tools/releaseBuild/generatePackgeSigning.ps1 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/releaseBuild/generatePackgeSigning.ps1 b/tools/releaseBuild/generatePackgeSigning.ps1 index b5b2032772..e083756513 100644 --- a/tools/releaseBuild/generatePackgeSigning.ps1 +++ b/tools/releaseBuild/generatePackgeSigning.ps1 @@ -4,10 +4,11 @@ param( [Parameter(Mandatory)] [string] $Path, [string[]] $AuthenticodeDualFiles, - [string[]] $AuthenticodeFiles + [string[]] $AuthenticodeFiles, + [string[]] $NuPkgFiles ) -if ((!$AuthenticodeDualFiles -or $AuthenticodeDualFiles.Count -eq 0) -and (!$AuthenticodeFiles -or $AuthenticodeFiles.Count -eq 0)) +if ((!$AuthenticodeDualFiles -or $AuthenticodeDualFiles.Count -eq 0) -and (!$AuthenticodeFiles -or $AuthenticodeFiles.Count -eq 0) -and (!$NuPkgFiles -or $NuPkgFiles.Count -eq 0)) { throw "At least one file must be specified" } @@ -69,6 +70,11 @@ foreach($file in $AuthenticodeFiles) New-FileElement -File $file -SignType 'Authenticode' -XmlDoc $signingXml -Job $job } +foreach($file in $NuPkgFiles) +{ + New-FileElement -File $file -SignType 'NuGet' -XmlDoc $signingXml -Job $job +} + $signingXml.Save($path) $updateScriptPath = Join-Path -Path $PSScriptRoot -ChildPath 'updateSigning.ps1' & $updateScriptPath -SigningXmlPath $path