From 8289b37d8297945efe424e527d8689a44bda25c2 Mon Sep 17 00:00:00 2001 From: pwalter <pwalter@ebi.ac.uk> Date: Tue, 31 Oct 2017 11:49:48 +0000 Subject: [PATCH] add cache time and delete setting for s3 sync --- bin/deploy-aws | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/deploy-aws b/bin/deploy-aws index 41260fb9..777cde62 100755 --- a/bin/deploy-aws +++ b/bin/deploy-aws @@ -14,12 +14,16 @@ DEPLOY_PATH="web_guidelines/${PROJECT}/${BRANCH}"; if [ "${1:-''}" = "prod" ]; then S3_BUCKET=${S3_BUCKET_PROD}; + MAX_AGE=60; # 1min else S3_BUCKET=${S3_BUCKET_DEV}; + MAX_AGE=60; # 1min fi; # push to AWS (exclude bin and .git) aws s3 sync . s3://${S3_BUCKET}/${DEPLOY_PATH} \ --exclude ".git*" \ --exclude "bin/*" \ + --delete \ + --cache-control "max-age=${MAX_AGE}" \ ; -- GitLab