Skip to content

Commit

Permalink
scripts/deploy-reader.sh BUGFIX: do a full s3 rm before s3 sync -…
Browse files Browse the repository at this point in the history
…- see [s3 sync \-\-exact\-timestamps flag ignored for uploads \#4460](aws/aws-cli#4460)
  • Loading branch information
da70 committed Sep 20, 2021
1 parent 722e440 commit f715330
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/deploy-reader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ function get_s3_bucket() {
function sync_s3_bucket() {
local s3_bucket=$1

aws s3 sync $CLOUD_READER_DIST s3://${s3_bucket}/open-square-reader/cloud-reader/ \
--delete \
--exact-timestamps
# Need to do a full rm followed by a sync from scratch because `aws s3 sync ... --exact-timestamps`
# only works for downloads from S3, not uploads: https://github.com/aws/aws-cli/issues/4460
aws s3 rm s3://${s3_bucket}/open-square-reader/cloud-reader --recursive
aws s3 sync $CLOUD_READER_DIST s3://${s3_bucket}/open-square-reader/cloud-reader/
}

function validate_environment_arg() {
Expand Down

0 comments on commit f715330

Please sign in to comment.