mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-25 23:43:25 +03:00
31 lines
912 B
Bash
Executable File
31 lines
912 B
Bash
Executable File
#!/bin/bash
|
|
|
|
VERSION=dev
|
|
|
|
set -e
|
|
|
|
# The parking mapper doesn't work on WASM yet, so don't include it
|
|
for tool in game santa fifteen_min osm_viewer; do
|
|
cd $tool
|
|
wasm-pack build --release --target web -- --no-default-features --features wasm
|
|
cd pkg
|
|
# Temporarily remove the symlink to the data directory; it's uploaded separately by the updater tool
|
|
rm -f system
|
|
aws s3 sync . s3://abstreet/$VERSION/$tool
|
|
# Undo that symlink hiding
|
|
git checkout system
|
|
cd ../..
|
|
done
|
|
|
|
# Set the content type for .wasm files, to speed up how browsers load them
|
|
aws s3 cp \
|
|
s3://abstreet/$VERSION \
|
|
s3://abstreet/$VERSION \
|
|
--exclude '*' \
|
|
--include '*.wasm' \
|
|
--no-guess-mime-type \
|
|
--content-type="application/wasm" \
|
|
--metadata-directive="REPLACE" \
|
|
--recursive
|
|
echo "Have the appropriate amount of fun: http://abstreet.s3-website.us-east-2.amazonaws.com/$VERSION"
|