From ffb0bd344d9629d84d456cbd8842dc58ac2aa763 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Mon, 22 Jul 2024 14:21:35 +0100 Subject: [PATCH] build, tools: drop leading `/` from `r2dir` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script is commented as removing `/home/dist/` part but the `cut` command is off by one and end up including the `/` character (so that the resulting string starts with `/`). When this is substituted into `s3://${cloudflare_bucket}/${r2dir}/${shafile}.asc` we end up with `//` (one from the template and one from the `r2dir`) which appears to cause Cloudflare to create an extra top level `/` directory in the bucket. PR-URL: https://github.com/nodejs/node/pull/53951 Reviewed-By: Rafael Gonzaga Reviewed-By: Luigi Pinca Reviewed-By: Michaƫl Zasso Reviewed-By: Marco Ippolito Reviewed-By: James M Snell --- tools/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release.sh b/tools/release.sh index 36576a53aac075..136eb87a0f1167 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -158,7 +158,7 @@ sign() { # since the promotion script should take care of uploading them. # Remove /home/dist/ part - r2dir=$(echo "$shadir" | cut -c 11-) + r2dir=$(echo "$shadir" | cut -c 12-) # Copy SHASUMS256.txt.asc # shellcheck disable=SC2086,SC2029