Add 'Cache-Control' header to S3 files

This commit is contained in:
Andrew Miner
2015-03-04 23:31:00 -08:00
parent 318cd6f8ee
commit 58ce5fdd63
+1 -1
View File
@@ -21,7 +21,7 @@ fi
if [[ "$TARGET" == "new" ]]; then if [[ "$TARGET" == "new" ]]; then
find "$DIST" -name ".DS_Store" | xargs rm find "$DIST" -name ".DS_Store" | xargs rm
grunt clean dist grunt clean dist
s3cmd sync -r --delete-removed "$DIST/" "s3://new.$SITE/" s3cmd sync -r --delete-removed --add-header="cache-control:max-age=1800" "$DIST/" "s3://new.$SITE/"
grunt clean build grunt clean build
elif [[ "$TARGET" == "promote" ]]; then elif [[ "$TARGET" == "promote" ]]; then
aws s3 sync "s3://new.$SITE" "s3://$SITE" --delete aws s3 sync "s3://new.$SITE" "s3://$SITE" --delete