Cache bust on deploy

This commit is contained in:
Jordan Eldredge 2018-03-13 19:55:05 -07:00
parent 94f59630dd
commit 35faa71597
3 changed files with 7 additions and 1 deletions

View file

@ -8,7 +8,9 @@ script: >
# python node_modules/travis-weigh-in/weigh_in.py built/winamp.js.gz
after_success:
- bash <(curl -s https://codecov.io/bash)
before_deploy: rm .gitignore
before_deploy:
- rm .gitignore
- ./scripts/bash.sh
deploy:
verbose: true
provider: pages

3
scripts/bust.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash -
APP_PATH=`find built | grep "winamp-.*.js$"`
sed -i .bk "s#built\/winamp.js#$APP_PATH#" index.html

View file

@ -20,6 +20,7 @@ config.plugins = [
];
config.output.publicPath = `${cdnUrl}built/`;
config.output.filename = "[name]-[hash].js";
config.entry.winamp.unshift("./js/googleAnalytics.min.js");