This commit is contained in:
Chris Bednarski 2016-04-12 15:09:54 -07:00
commit 39cb194e0b
3 changed files with 23 additions and 5 deletions

View File

@ -1,5 +1,7 @@
**DELETE THIS TEMPLATE BEFORE SUBMITTING** **DELETE THIS TEMPLATE BEFORE SUBMITTING**
_Only use Github issues to report bugs or feature requests, see https://www.packer.io/community/_
If you are planning to open a pull-request just open the pull-request instead of making an issue first. If you are planning to open a pull-request just open the pull-request instead of making an issue first.
FOR FEATURES: FOR FEATURES:

View File

@ -27,8 +27,10 @@
"FASTLY_API_KEY={{ user `fastly_api_key` }}" "FASTLY_API_KEY={{ user `fastly_api_key` }}"
], ],
"inline": [ "inline": [
"apt-get update", "apt-get -qq update",
"apt-get install -y build-essential curl git libffi-dev s3cmd wget", "apt-get -yqq install build-essential curl git libffi-dev wget",
"apt-get -yqq install python-pip",
"pip install s3cmd",
"cd /app", "cd /app",
"bundle check || bundle install --jobs 7", "bundle check || bundle install --jobs 7",

View File

@ -64,15 +64,29 @@ if [ -z "$NO_UPLOAD" ]; then
# 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 some assets, 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/**/*.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/**/*.css" --exclude "*" \
--include "*.css" \
--recursive \
modify "s3://hc-sites/$PROJECT/latest/"
echo "Overriding svg mime-types..."
s3cmd \ s3cmd \
--mime-type="image/svg+xml" \ --mime-type="image/svg+xml" \
modify "s3://hc-sites/$PROJECT/latest/**/*.svg" --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.