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,7 @@ 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
56
+ aws s3 cp ${dstdir} /${version} /SHASUMS256.txt $staging_bucket /$relativedir /${version} /SHASUM256.txt --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile
0 commit comments