File tree 3 files changed +39
-6
lines changed
ansible/www-standalone/tools/promote 3 files changed +39
-6
lines changed Original file line number Diff line number Diff line change 6
6
dstdir=$2
7
7
version=$3
8
8
9
+ if [ " X${site} " == " X" ]; then
10
+ echo " site argument not provided"
11
+ exit 1
12
+ fi
13
+
9
14
if [ " X${dstdir} " == " X" ]; then
10
15
echo " dstdir argument not provided"
11
16
exit 1
@@ -16,6 +21,26 @@ if [ "X${version}" == "X" ]; then
16
21
exit 1
17
22
fi
18
23
24
+ if [ -z ${dist_rootdir+x} ]; then
25
+ echo " \$ dist_rootdir is not set"
26
+ exit 1
27
+ fi
28
+
29
+ if [ -z ${staging_bucket+x} ]; then
30
+ echo " \$ staging_bucket is not set"
31
+ exit 1
32
+ fi
33
+
34
+ if [ -z ${cloudflare_endpoint+x} ]; then
35
+ echo " \$ cloudflare_endpoint is not set"
36
+ exit 1
37
+ fi
38
+
39
+ if [ -z ${cloudflare_profile+x} ]; then
40
+ echo " \$ cloudflare_profile is not set"
41
+ exit 1
42
+ fi
43
+
19
44
(cd " ${dstdir} /${version} " && shasum -a256 $( ls node* openssl* iojs* win-* /* x64/* 2> /dev/null) > SHASUMS256.txt) || exit 1
20
45
if [[ $version =~ ^v[0] ]]; then
21
46
(cd " ${dstdir} /${version} " && shasum $( ls node* openssl* x64/* 2> /dev/null) > SHASUMS.txt) || exit 1
@@ -25,3 +50,6 @@ nodejs-dist-indexer --dist $dstdir --indexjson ${dstdir}/index.json --indextab
25
50
find " ${dstdir} /${version} " -type f -exec chmod 644 ' {}' \;
26
51
find " ${dstdir} /${version} " -type d -exec chmod 755 ' {}' \;
27
52
53
+ relativedir=${dstdir/ $dist_rootdir / " $site /" }
54
+ aws s3 cp ${dstdir} /index.json $staging_bucket /$relativedir /index.json --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile
55
+ aws s3 cp ${dstdir} /index.tab $staging_bucket /$relativedir /index.tab --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile
Original file line number Diff line number Diff line change @@ -39,4 +39,5 @@ chakracore_release_dirmatch=.*
39
39
40
40
cloudflare_endpoint=https://07be8d2fbc940503ca1be344714cb0d1.r2.cloudflarestorage.com
41
41
cloudflare_profile=worker
42
- destination_bucket=s3://dist-prod
42
+ staging_bucket=s3://dist-staging
43
+ dist_bucket=s3://dist-prod
Original file line number Diff line number Diff line change @@ -22,8 +22,12 @@ if [ -z ${dist_rootdir+x} ]; then
22
22
echo " \$ dist_rootdir is not set"
23
23
exit 1
24
24
fi
25
- if [ -z ${destination_bucket+x} ]; then
26
- echo " \$ destination_bucket is not set"
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"
27
31
exit 1
28
32
fi
29
33
if [ -z ${cloudflare_endpoint+x} ]; then
38
42
relativedir=${dstdir/ $dist_rootdir / " $site /" }
39
43
tmpversion=$2
40
44
41
- aws s3 cp $dstdir / $ tmpversion / $destination_bucket /$relativedir /$tmpversion / --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile --recursive --no-follow-symlinks
42
- aws s3 cp $dstdir / index.json $destination_bucket /$relativedir /index.json --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile
43
- aws s3 cp $dstdir / index.tab $destination_bucket /$relativedir /index.tab --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile
45
+ aws s3 cp $staging_bucket / $relativedir / $ tmpversion / $dist_bucket /$relativedir /$tmpversion / --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile --recursive --no-follow-symlinks
46
+ aws s3 cp $staging_bucket / $relativedir / index.json $dist_bucket /$relativedir /index.json --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile
47
+ aws s3 cp $staging_bucket / $relativedir / index.tab $dist_bucket /$relativedir /index.tab --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile
You can’t perform that action at this time.
0 commit comments