diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index a71236ff9e7..64548cc4d49 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -5,6 +5,12 @@ task 'assets:precompile:before' do raise "rake assets:precompile should only be run in RAILS_ENV=production, you are risking unminified assets" end + # Ensure we ALWAYS do a clean build + # We use many .erbs that get out of date quickly, especially with plugins + puts "Purging old assets" + `rm -fr #{Rails.root}/tmp/cache` + `rm -fr #{Rails.root}/public/assets` + # in the past we applied a patch that removed asset postfixes, but it is terrible practice # leaving very complicated build issues # https://github.com/rails/sprockets-rails/issues/49