2020-10-09 02:29:06 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-04-02 05:31:02 +03:00
|
|
|
set -x
|
2020-11-03 04:36:02 +03:00
|
|
|
VERSION=dev
|
2021-04-02 05:31:02 +03:00
|
|
|
# S3_ROOT=s3://mjk_asdf/abstreet
|
|
|
|
S3_ROOT=s3://abstreet
|
2020-11-03 04:36:02 +03:00
|
|
|
|
2020-10-09 02:29:06 +03:00
|
|
|
set -e
|
2020-12-03 00:44:10 +03:00
|
|
|
|
2021-04-02 05:31:02 +03:00
|
|
|
cd web;
|
|
|
|
make release
|
|
|
|
aws s3 sync build/dist/ $S3_ROOT/$VERSION/
|
2020-12-03 00:44:10 +03:00
|
|
|
|
2020-11-02 23:30:56 +03:00
|
|
|
# Set the content type for .wasm files, to speed up how browsers load them
|
|
|
|
aws s3 cp \
|
2021-04-02 05:31:02 +03:00
|
|
|
$S3_ROOT/$VERSION \
|
|
|
|
$S3_ROOT/$VERSION \
|
2020-11-02 23:30:56 +03:00
|
|
|
--exclude '*' \
|
|
|
|
--include '*.wasm' \
|
|
|
|
--no-guess-mime-type \
|
|
|
|
--content-type="application/wasm" \
|
|
|
|
--metadata-directive="REPLACE" \
|
|
|
|
--recursive
|
2021-04-02 05:31:02 +03:00
|
|
|
|
2020-11-03 04:36:02 +03:00
|
|
|
echo "Have the appropriate amount of fun: http://abstreet.s3-website.us-east-2.amazonaws.com/$VERSION"
|