Skip to content

Commit 7906688

Browse files
authored
fix: add cache control feature (#367)
* fix: add cache control feature * feat: remove '' * fix: debug * fix: remove debug * fix: remove single quotes
1 parent 5ec4de8 commit 7906688

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/commands/aws/clone_s3_assets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ parameters:
1616
cache_control:
1717
description: Cache control header value
1818
type: string
19-
default: 'max-age=31536000, public' # 1 year
19+
default: ''
2020
steps:
2121
- run:
2222
name: << parameters.step_name >>

src/scripts/aws/clone_s3_assets.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
if (( CLEAN_DESTINATION )); then
4-
if [ -n "$CACHE_CONTROL" ]; then
4+
if [[ -n "$CACHE_CONTROL" ]]; then
55
aws s3 sync "$FROM" "$TO" --delete --cache-control "$CACHE_CONTROL"
66
else
77
aws s3 sync "$FROM" "$TO" --delete
88
fi
99
else
10-
if [ -n "$CACHE_CONTROL" ]; then
10+
if [[ -n "$CACHE_CONTROL" ]]; then
1111
aws s3 sync "$FROM" "$TO" --cache-control "$CACHE_CONTROL"
1212
else
1313
aws s3 sync "$FROM" "$TO"

0 commit comments

Comments
 (0)