@@ -22,30 +22,18 @@ if [ -z ${dist_rootdir+x} ]; then
22
22
echo " \$ dist_rootdir is not set"
23
23
exit 1
24
24
fi
25
- if [ -z ${staging_bucket+x} ]; then
26
- echo " \$ staging_bucket is not set"
27
- exit 1
28
- fi
29
- if [ -z ${dist_bucket+x} ]; then
30
- echo " \$ dist_bucket is not set"
25
+ if [ -z ${prod_bucket+x} ]; then
26
+ echo " \$ prod_bucket is not set"
31
27
exit 1
32
28
fi
33
- if [ -z ${cloudflare_endpoint+x} ]; then
34
- echo " \$ cloudflare_endpoint is not set"
35
- exit 1
36
- fi
37
- if [ -z ${cloudflare_profile+x} ]; then
38
- echo " \$ cloudflare_profile is not set"
29
+ if [ -z ${staging_bucket+x} ]; then
30
+ echo " \$ staging_bucket is not set"
39
31
exit 1
40
32
fi
41
33
42
34
relativedir=${dstdir/ $dist_rootdir / " $site /" }
43
35
tmpversion=$2
44
36
45
- # Due to R2 limitations, `aws s3 cp` and `aws s3 sync` only succeed in copying
46
- # different sets of files across. Fortunately the sets are disjoint, so running
47
- # both commands (ignoring errors) will copy all the files across.
48
- 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
49
- aws s3 sync $staging_bucket /$relativedir /$tmpversion / $dist_bucket /$relativedir /$tmpversion / --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile --no-follow-symlinks || true
50
- aws s3 cp $staging_bucket /$relativedir /index.json $dist_bucket /$relativedir /index.json --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile
51
- aws s3 cp $staging_bucket /$relativedir /index.tab $dist_bucket /$relativedir /index.tab --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile
37
+ rclone copy $staging_bucket /$relativedir /$tmpversion / $prod_bucket /$relativedir /$tmpversion /
38
+ rclone copyto $staging_bucket /$relativedir /index.json $prod_bucket /$relativedir /index.json
39
+ rclone copyto $staging_bucket /$relativedir /index.tab $prod_bucket /$relativedir /index.tab
0 commit comments