From 6c1c31adab07da95a9d73d2e91d565b52e414905 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 9 Feb 2021 22:39:15 -0800 Subject: [PATCH] Fix third party signing for files in sub-folders (#14751) --- .../azureDevOps/templates/windows-packaging.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml b/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml index 81eac8e5a1..1554afccab 100644 --- a/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml +++ b/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml @@ -180,7 +180,14 @@ jobs: $null = New-Item -ItemType Directory -Path $signedFilesDirectory -Force $missingSignatures | ForEach-Object { - Copy-Item -Path $_ -Destination $filesToSignDirectory + $pathWithoutLeaf = Split-Path $_ + $relativePath = $pathWithoutLeaf.replace($BuildPath,'') + $targetDirectory = Join-Path -Path $filesToSignDirectory -ChildPath $relativePath + if(!(Test-Path $targetDirectory)) + { + $null = New-Item -ItemType Directory -Path $targetDirectory -Force + } + Copy-Item -Path $_ -Destination $targetDirectory } displayName: Create ThirdParty Signing Folder