From 9b0071e14814ec8d65ac11316c91036f19a2ba55 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 4987514291fb..7a16c2bc678c 100644 --- a/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml +++ b/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml @@ -178,7 +178,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