[GHA-Build] Debug cloudflare cache flush script

This commit is contained in:
aboyko
2023-07-31 17:21:34 -04:00
parent c49577fbaa
commit 427783e2a7

View File

@@ -20,15 +20,21 @@ counter=0
json=""
for file in $files
do
echo "Processing ${file}"
if [[ "$counter" -eq 0 ]]; then
json="\"{ \"files\": [\n"
fi
echo "Current json: ${json}"
if [[ "$file" =~ ^"s3://dist.springsource.com" ]]; then
echo "Is a file in s3 ${file}"
((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"
fi
if [[ "$counter" -eq 10 ]]; then
echo "Batch completed"
json="${json:-2}\n]}"
echo $json
json=""