Skip to content

Commit

Permalink
website: Handle SVGs in deployment mime-type fixup as well
Browse files Browse the repository at this point in the history
  • Loading branch information
phinze committed Apr 7, 2016
1 parent d687842 commit bf45bfb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions website/scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,16 @@ if [ -z "$NO_UPLOAD" ]; then
sync "$DIR/build/" "s3://hc-sites/$PROJECT/latest/"

# 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.
s3cmd \
--mime-type="application/javascript" \
modify "s3://hc-sites/$PROJECT/latest/assets/javascripts/*.js"
modify "s3://hc-sites/$PROJECT/latest/**/*.js"
s3cmd \
--mime-type="text/css" \
modify "s3://hc-sites/$PROJECT/latest/assets/stylesheets/*.css"
modify "s3://hc-sites/$PROJECT/latest/**/*.css"
s3cmd \
--mime-type="image/svg+xml" \
modify "s3://hc-sites/$PROJECT/latest/**/*.svg"
fi

# Perform a soft-purge of the surrogate key.
Expand Down

0 comments on commit bf45bfb

Please sign in to comment.