forked from eclipsesource/jsonforms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-fusebit.sh
More file actions
executable file
·25 lines (20 loc) · 962 Bytes
/
deploy-fusebit.sh
File metadata and controls
executable file
·25 lines (20 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
FILES="./node_modules/react/umd/react.production.min.js \
./node_modules/react-dom/umd/react-dom.production.min.js \
./node_modules/@material-ui/core/umd/material-ui.production.min.js \
./packages/core/lib/jsonforms-core.js \
./packages/react/lib/jsonforms-react.js \
./packages/material/lib/jsonforms-material.js"
VERSION=`jq -rc ".version" packages/core/package.json`
MAJOR=`echo ${VERSION} | sed 's/\([0-9]*\)\.\([0-9]*\)\.\(.*\)/\1/'`
MINOR=`echo ${VERSION} | sed 's/\([0-9]*\)\.\([0-9]*\)\.\(.*\)/\2/'`
PATCH=`echo ${VERSION} | sed 's/\([0-9]*\)\.\([0-9]*\)\.\(.*\)/\3/'`
S3_BASE=s3://fusebit-io-cdn/fusebit/js/fusebit-form
S3_LOCS="${S3_BASE}/latest ${S3_BASE}/${MAJOR} ${S3_BASE}/${MAJOR}/${MINOR} ${S3_BASE}/${MAJOR}/${MINOR}/${PATCH}"
for file in ${FILES}; do
for loc in ${S3_LOCS}; do
aws s3 cp --acl public-read --content-type application/javascript --cache-control max-age=300 \
${file} \
${loc}/
done
done