From 4068332485f6711e27407a0e76cf12b92bf92708 Mon Sep 17 00:00:00 2001 From: aboyko Date: Mon, 31 Jul 2023 17:28:13 -0400 Subject: [PATCH] [GHA-Build] Debug cloudflare cache flush script --- .github/scripts/clear-s3-caches.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/clear-s3-caches.sh b/.github/scripts/clear-s3-caches.sh index c2f70e994..9c44a72b2 100755 --- a/.github/scripts/clear-s3-caches.sh +++ b/.github/scripts/clear-s3-caches.sh @@ -22,20 +22,20 @@ for file in $files do echo "Processing ${file}" if [[ "$counter" -eq 0 ]]; then - json="\"{ \"files\": [\n" + json="{\"files\": [$'\n'" fi echo "Current json: ${json}" if [[ "$file" =~ ^"s3://dist.springsource.com" ]]; then echo "Is a file in s3 ${file}" - ((counter++)) + let "counter++" echo "Counter ${counter}" path=${file:26} echo "Path ${path}" - json="${json}\"http://dist.springsource.com${path}\",\n\"http://dist.springsource.com${path}\",\n\"http://download.springsource.com${path}\",\n\"https://download.springsource.com${path}\",\n" + json="${json}\"http://dist.springsource.com${path}\",$'\n'\"http://dist.springsource.com${path}\",$'\n'\"http://download.springsource.com${path}\",$'\n'\"https://download.springsource.com${path}\",$'\n'" fi if [[ "$counter" -eq 10 ]]; then echo "Batch completed" - json="${json:-2}\n]}" + json="${json:-2}$'\n']}" echo $json json="" fi