infra/main.tf: Use --size-only option until 'aws s3 sync' can use checksums
* infra/main.tf: This avoid a deployment issue after switching to guix for builds. Namely, after to switching to guix to build this project, all built site files will have a datetime of Unix epoch 0, which will then never be updated when running 'aws s3 sync ...' because the files in the bucket were deployed before the site was built using guix, so they have newer timestamps. Using the '--size-only' option improves this situation, in that files that are modified and have a different size then the original will be updated, but files that are changed but, by chance have the same size, will not be updated. Ironically, the update that I discovered this on will end up resulting the same file sizes (changing the copyright date).
This commit is contained in:
parent
cee5d48466
commit
93dfdb08fd
@ -399,7 +399,7 @@ aws configure --profile ${aws_iam_user.app_deploy.name} set aws_secret_access_ke
|
||||
aws configure --profile ${aws_iam_user.app_deploy.name} set region ${var.region};
|
||||
|
||||
: Sync latest app build to s3 bucket;
|
||||
aws --profile ${aws_iam_user.app_deploy.name} s3 sync --delete ${var.site_static_files_dir} s3://${aws_s3_bucket.static.id}/;
|
||||
aws --profile ${aws_iam_user.app_deploy.name} s3 sync --delete ${var.site_static_files_dir} --size-only s3://${aws_s3_bucket.static.id}/;
|
||||
|
||||
: Cleanup temporary aws config and credentials files
|
||||
rm $${AWS_CONFIG_FILE} $${AWS_SHARED_CREDENTIALS_FILE};
|
||||
|
Loading…
Reference in New Issue
Block a user