From 297e02ac3b3d2a4e7cc61b8aff58c8a3c5568157 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 14 Jan 2019 22:10:21 +0100 Subject: [PATCH] Add upload-script Signed-off-by: Knut Ahlers --- upload.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 upload.sh diff --git a/upload.sh b/upload.sh new file mode 100644 index 0000000..210445d --- /dev/null +++ b/upload.sh @@ -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"