Added logic to create signing XML for NuGet packages (#6921)

This commit is contained in:
Aditya Patwardhan
2018-05-22 15:34:21 -07:00
committed by GitHub
parent 862d99f595
commit 9f25daa059
+8 -2
View File
@@ -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