This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 385
/
deploy.sh
executable file
·42 lines (36 loc) · 2.14 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
TAG=$1
if [ -z $TAG ]; then
echo "Usage: deploy.sh <tag>"
exit;
fi
existing=`aws s3 ls s3://mapbox-js/mapbox.js/$TAG/`
if [ "$existing" != "" ]; then
echo "will not overwrite $TAG"
echo "has content"
echo "$existing"
exit;
fi
echo "--- DEPLOYING mapbox.js $TAG ---"
echo ""
echo ""
aws s3 cp --acl=public-read dist/mapbox.js s3://mapbox-js/mapbox.js/$TAG/mapbox.js
aws s3 cp --acl=public-read dist/mapbox.js.map s3://mapbox-js/mapbox.js/$TAG/mapbox.js.map
aws s3 cp --acl=public-read dist/mapbox.uncompressed.js s3://mapbox-js/mapbox.js/$TAG/mapbox.uncompressed.js
aws s3 cp --acl=public-read dist/mapbox.standalone.js s3://mapbox-js/mapbox.js/$TAG/mapbox.standalone.js
aws s3 cp --acl=public-read dist/mapbox.standalone.js.map s3://mapbox-js/mapbox.js/$TAG/mapbox.standalone.js.map
aws s3 cp --acl=public-read dist/mapbox.standalone.uncompressed.js s3://mapbox-js/mapbox.js/$TAG/mapbox.standalone.uncompressed.js
aws s3 cp --acl=public-read dist/mapbox.css s3://mapbox-js/mapbox.js/$TAG/mapbox.css
aws s3 cp --acl=public-read dist/mapbox.standalone.css s3://mapbox-js/mapbox.js/$TAG/mapbox.standalone.css
aws s3 cp --acl=public-read dist/images/layers.png s3://mapbox-js/mapbox.js/$TAG/images/layers.png
aws s3 cp --acl=public-read dist/images/layers-2x.png s3://mapbox-js/mapbox.js/$TAG/images/layers-2x.png
aws s3 cp --acl=public-read dist/images/marker-icon.png s3://mapbox-js/mapbox.js/$TAG/images/marker-icon.png
aws s3 cp --acl=public-read dist/images/marker-icon-2x.png s3://mapbox-js/mapbox.js/$TAG/images/marker-icon-2x.png
aws s3 cp --acl=public-read dist/images/marker-shadow.png s3://mapbox-js/mapbox.js/$TAG/images/marker-shadow.png
aws s3 cp --acl=public-read dist/images/[email protected] s3://mapbox-js/mapbox.js/$TAG/images/[email protected]
aws s3 cp --acl=public-read dist/images/[email protected] s3://mapbox-js/mapbox.js/$TAG/images/[email protected]
aws s3 cp --acl=public-read dist/images/icons.svg s3://mapbox-js/mapbox.js/$TAG/images/icons.svg
aws s3 cp --acl=public-read dist/images/icons-ffffff.svg s3://mapbox-js/mapbox.js/$TAG/images/icons-ffffff.svg
echo ""
echo ""
echo "--- DEPLOYED mapbox.js $TAG ! ---"