Skip to content

Commit

Permalink
ansible: mirror upload_to_cloudflare.sh changes
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlau committed Jul 22, 2024
1 parent d9c4ea9 commit 05cc876
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ansible/www-standalone/tools/promote/upload_to_cloudflare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ fi
relativedir=${dstdir/$dist_rootdir/"$site/"}
tmpversion=$2

aws s3 cp $staging_bucket/$relativedir/$tmpversion/ $dist_bucket/$relativedir/$tmpversion/ --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile --recursive --no-follow-symlinks
# Due to R2 limitations, `aws s3 cp` and `aws s3 sync` only succeed in copying # different sets of files across. Fortunately the sets are disjoint, so running # both commands (ignoring errors) will copy all the files across.
aws s3 cp $staging_bucket/$relativedir/$tmpversion/ $dist_bucket/$relativedir/$tmpversion/ --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile --recursive --no-follow-symlinks --copy-props none || true
aws s3 sync $staging_bucket/$relativedir/$tmpversion/ $dist_bucket/$relativedir/$tmpversion/ --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile --no-follow-symlinks || true
aws s3 cp $staging_bucket/$relativedir/index.json $dist_bucket/$relativedir/index.json --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile
aws s3 cp $staging_bucket/$relativedir/index.tab $dist_bucket/$relativedir/index.tab --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile

0 comments on commit 05cc876

Please sign in to comment.