forked from mapbox/mapbox.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·44 lines (34 loc) · 2.28 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
43
44
#!/bin/bash
TAG=$1
if [ -z $TAG ]; then
echo "Usage: deploy.sh <tag>"
exit;
fi
existing=`s3cmd 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 ""
s3cmd put --acl-public --mime-type "application/javascript" dist/mapbox.js s3://mapbox-js/mapbox.js/$TAG/mapbox.js
s3cmd put --acl-public --mime-type "application/javascript" dist/mapbox.uncompressed.js s3://mapbox-js/mapbox.js/$TAG/mapbox.uncompressed.js
s3cmd put --acl-public --mime-type "application/javascript" dist/mapbox.standalone.js s3://mapbox-js/mapbox.js/$TAG/mapbox.standalone.js
s3cmd put --acl-public --mime-type "application/javascript" dist/mapbox.standalone.uncompressed.js s3://mapbox-js/mapbox.js/$TAG/mapbox.standalone.uncompressed.js
s3cmd put --acl-public --mime-type "text/css" dist/mapbox.css s3://mapbox-js/mapbox.js/$TAG/mapbox.css
s3cmd put --acl-public --mime-type "text/css" dist/mapbox.standalone.css s3://mapbox-js/mapbox.js/$TAG/mapbox.standalone.css
s3cmd put --acl-public --mime-type "image/png" dist/images/layers.png s3://mapbox-js/mapbox.js/$TAG/images/layers.png
s3cmd put --acl-public --mime-type "image/png" dist/images/layers-2x.png s3://mapbox-js/mapbox.js/$TAG/images/layers-2x.png
s3cmd put --acl-public --mime-type "image/png" dist/images/marker-icon.png s3://mapbox-js/mapbox.js/$TAG/images/marker-icon.png
s3cmd put --acl-public --mime-type "image/png" dist/images/marker-icon-2x.png s3://mapbox-js/mapbox.js/$TAG/images/marker-icon-2x.png
s3cmd put --acl-public --mime-type "image/png" dist/images/marker-shadow.png s3://mapbox-js/mapbox.js/$TAG/images/marker-shadow.png
s3cmd put --acl-public --mime-type "image/png" dist/images/icons-000000.png s3://mapbox-js/mapbox.js/$TAG/images/icons-000000.png
s3cmd put --acl-public --mime-type "image/png" dist/images/[email protected] s3://mapbox-js/mapbox.js/$TAG/images/[email protected]
s3cmd put --acl-public --mime-type "image/png" dist/images/icons-ffffff.png s3://mapbox-js/mapbox.js/$TAG/images/icons-ffffff.png
s3cmd put --acl-public --mime-type "image/png" dist/images/[email protected] s3://mapbox-js/mapbox.js/$TAG/images/[email protected]
echo ""
echo ""
echo "--- DEPLOYED mapbox.js $TAG ! ---"