1
0
Fork 0
mirror of https://github.com/Luzifer/past3.git synced 2024-11-09 16:30:01 +00:00
past3/upload.sh
Knut Ahlers 297e02ac3b
Add upload-script
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2019-01-14 22:10:21 +01:00

18 lines
387 B
Bash

#!/bin/bash
set -euxo pipefail
BUCKET=${BUCKET:-}
[ -z "${BUCKET}" ] && {
echo 'You need to specify $BUCKET'
exit 2
}
# Generate assets
make clean generate
# Upload assets
aws s3 cp --acl=public-read --content-type=application/javascript \
public/app.js "s3://${BUCKET}/app.js"
aws s3 cp --acl=public-read --content-type=text/html \
public/index.html "s3://${BUCKET}/index.html"