From b6d0df359a742f2b549d0b6099fb443c1ce26564 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 19 Jul 2024 16:34:09 +0000 Subject: [PATCH] build, tools: drop leading `/` from `r2dir` 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. --- 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