|
|
@ -63,13 +63,30 @@ if [ -z "$NO_UPLOAD" ]; then |
|
|
|
sync "$DIR/build/" "s3://hc-sites/$PROJECT/latest/" |
|
|
|
sync "$DIR/build/" "s3://hc-sites/$PROJECT/latest/" |
|
|
|
|
|
|
|
|
|
|
|
# The s3cmd guessed mime type for text files is often wrong. This is |
|
|
|
# The s3cmd guessed mime type for text files is often wrong. This is |
|
|
|
# problematic for JS/CSS, so force their mime types to be correct. |
|
|
|
# problematic for some assets, so force their mime types to be correct. |
|
|
|
|
|
|
|
echo "Overriding javascript mime-types..." |
|
|
|
s3cmd \ |
|
|
|
s3cmd \ |
|
|
|
--mime-type="application/javascript" \ |
|
|
|
--mime-type="application/javascript" \ |
|
|
|
modify "s3://hc-sites/$PROJECT/latest/assets/javascripts/*.js" |
|
|
|
--exclude "*" \ |
|
|
|
|
|
|
|
--include "*.js" \ |
|
|
|
|
|
|
|
--recursive \ |
|
|
|
|
|
|
|
modify "s3://hc-sites/$PROJECT/latest/" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "Overriding css mime-types..." |
|
|
|
s3cmd \ |
|
|
|
s3cmd \ |
|
|
|
--mime-type="text/css" \ |
|
|
|
--mime-type="text/css" \ |
|
|
|
modify "s3://hc-sites/$PROJECT/latest/assets/stylesheets/*.css" |
|
|
|
--exclude "*" \ |
|
|
|
|
|
|
|
--include "*.css" \ |
|
|
|
|
|
|
|
--recursive \ |
|
|
|
|
|
|
|
modify "s3://hc-sites/$PROJECT/latest/" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "Overriding svg mime-types..." |
|
|
|
|
|
|
|
s3cmd \ |
|
|
|
|
|
|
|
--mime-type="image/svg+xml" \ |
|
|
|
|
|
|
|
--exclude "*" \ |
|
|
|
|
|
|
|
--include "*.svg" \ |
|
|
|
|
|
|
|
--recursive \ |
|
|
|
|
|
|
|
modify "s3://hc-sites/$PROJECT/latest/" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Perform a soft-purge of the surrogate key. |
|
|
|
# Perform a soft-purge of the surrogate key. |
|
|
|