From 5932c55350c692cb7afb22096e839179963b0644 Mon Sep 17 00:00:00 2001 From: Francis Date: Thu, 12 Oct 2023 15:19:29 -0700 Subject: [PATCH 1/2] get nuget_package and use it Signed-off-by: Francis --- lib/signing/nuget/sign.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/signing/nuget/sign.sh b/lib/signing/nuget/sign.sh index e8d9a318..021eeaa0 100644 --- a/lib/signing/nuget/sign.sh +++ b/lib/signing/nuget/sign.sh @@ -21,12 +21,13 @@ fi found=false for nuget_package_path in $(find dotnet -name *.nupkg -not -iname *.symbols.nupkg); do found=true - echo "🔑 Applying authenticode signatures to assemblies in ${nuget_package_path}" - for file in $(unzip -Z1 ${nuget_package_path} '*.dll'); do + nuget_package=$(cd $(dirname ${nuget_package_path}) && echo $PWD)/$(basename ${nuget_package_path}) + echo "🔑 Applying authenticode signatures to assemblies in ${nuget_package}" + for file in $(unzip -Z1 ${nuget_package} '*.dll'); do echo "📄 Assembly: ${file}" tmp=$(mktemp -d) # extract the dll from the zip file - unzip -q ${nuget_package_path} -d ${tmp} ${file} + unzip -q ${nuget_package} -d ${tmp} ${file} # need to set appropriate permissions, otherwise the file has none chmod u+rw ${tmp}/${file} # upload dll to signer bucket @@ -50,7 +51,7 @@ for nuget_package_path in $(find dotnet -name *.nupkg -not -iname *.symbols.nupk # replace the dll in the nuget package ( cd ${tmp} - zip -qfr ${nuget_package_path} ${file} + zip -qfr ${nuget_package} ${file} ) # clean up temporary directory rm -rf ${tmp} From 1827422664c669bf703378ee0a7bd4f961f5bc36 Mon Sep 17 00:00:00 2001 From: Francis Date: Thu, 12 Oct 2023 15:59:38 -0700 Subject: [PATCH 2/2] update asset hash Signed-off-by: Francis --- lib/__tests__/signing.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/__tests__/signing.test.ts b/lib/__tests__/signing.test.ts index c988ee74..38bdaf93 100644 --- a/lib/__tests__/signing.test.ts +++ b/lib/__tests__/signing.test.ts @@ -51,7 +51,7 @@ describe('with standard pipeline', () => { { Name: 'SCRIPT_S3_KEY', Type: 'PLAINTEXT', - Value: '57b2661c55d0400ef7c5db10e1d13ea42db5520c0338de4ca7cf407f8cc325e2.zip', + Value: 'a04bdf56b18c26031d8d67e4d1f9acbd9f2f0126d20ae0bb88be1491f63b18bf.zip', }, { Name: 'SIGNING_BUCKET_NAME', @@ -267,7 +267,7 @@ describe('with standard pipeline', () => { { Name: 'SCRIPT_S3_KEY', Type: 'PLAINTEXT', - Value: '57b2661c55d0400ef7c5db10e1d13ea42db5520c0338de4ca7cf407f8cc325e2.zip', + Value: 'a04bdf56b18c26031d8d67e4d1f9acbd9f2f0126d20ae0bb88be1491f63b18bf.zip', }, { Name: 'SIGNING_BUCKET_NAME',