mirror of
https://github.com/Luzifer/past3.git
synced 2024-12-22 20:31:16 +00:00
Add upload-script
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
dd6c9ee00e
commit
297e02ac3b
1 changed files with 18 additions and 0 deletions
18
upload.sh
Normal file
18
upload.sh
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/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"
|
Loading…
Reference in a new issue