66dstdir=$2
77version=$3
88
9+ if [ " X${site} " == " X" ]; then
10+ echo " site argument not provided"
11+ exit 1
12+ fi
13+
914if [ " X${dstdir} " == " X" ]; then
1015 echo " dstdir argument not provided"
1116 exit 1
@@ -16,6 +21,26 @@ if [ "X${version}" == "X" ]; then
1621 exit 1
1722fi
1823
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+
1944(cd " ${dstdir} /${version} " && shasum -a256 $( ls node* openssl* iojs* win-* /* x64/* 2> /dev/null) > SHASUMS256.txt) || exit 1
2045if [[ $version =~ ^v[0] ]]; then
2146 (cd " ${dstdir} /${version} " && shasum $( ls node* openssl* x64/* 2> /dev/null) > SHASUMS.txt) || exit 1
@@ -25,3 +50,7 @@ nodejs-dist-indexer --dist $dstdir --indexjson ${dstdir}/index.json --indextab
2550find " ${dstdir} /${version} " -type f -exec chmod 644 ' {}' \;
2651find " ${dstdir} /${version} " -type d -exec chmod 755 ' {}' \;
2752
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
56+ aws s3 cp ${dstdir} /${version} /SHASUMS256.txt $staging_bucket /$relativedir /${version} /SHASUM256.txt --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile
0 commit comments