mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-25 11:44:25 +03:00
c481567ebb
Uploading files individually to Dropbox is flaky, and the unique URL per file complicates data/MANIFEST. While we're at it, start carving aside a directory structure for keeping data for the last few releases. [rebuild] to make sure github actions can download everything
25 lines
771 B
Bash
Executable File
25 lines
771 B
Bash
Executable File
#!/bin/bash
|
|
|
|
VERSION=dev
|
|
|
|
set -e
|
|
cd game
|
|
wasm-pack build --release --target web -- --no-default-features --features wasm,wasm_s3
|
|
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
|
|
# Undo that symlink hiding
|
|
git checkout system
|
|
# 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"
|