Skip to content

Commit 9f25daa

Browse files
Added logic to create signing XML for NuGet packages (#6921)
1 parent 862d99f commit 9f25daa

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

tools/releaseBuild/generatePackgeSigning.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ param(
44
[Parameter(Mandatory)]
55
[string] $Path,
66
[string[]] $AuthenticodeDualFiles,
7-
[string[]] $AuthenticodeFiles
7+
[string[]] $AuthenticodeFiles,
8+
[string[]] $NuPkgFiles
89
)
910

10-
if ((!$AuthenticodeDualFiles -or $AuthenticodeDualFiles.Count -eq 0) -and (!$AuthenticodeFiles -or $AuthenticodeFiles.Count -eq 0))
11+
if ((!$AuthenticodeDualFiles -or $AuthenticodeDualFiles.Count -eq 0) -and (!$AuthenticodeFiles -or $AuthenticodeFiles.Count -eq 0) -and (!$NuPkgFiles -or $NuPkgFiles.Count -eq 0))
1112
{
1213
throw "At least one file must be specified"
1314
}
@@ -69,6 +70,11 @@ foreach($file in $AuthenticodeFiles)
6970
New-FileElement -File $file -SignType 'Authenticode' -XmlDoc $signingXml -Job $job
7071
}
7172

73+
foreach($file in $NuPkgFiles)
74+
{
75+
New-FileElement -File $file -SignType 'NuGet' -XmlDoc $signingXml -Job $job
76+
}
77+
7278
$signingXml.Save($path)
7379
$updateScriptPath = Join-Path -Path $PSScriptRoot -ChildPath 'updateSigning.ps1'
7480
& $updateScriptPath -SigningXmlPath $path

0 commit comments

Comments
 (0)