diff --git a/spec/support/outputs/rails_assets_precompile.txt b/spec/support/outputs/rails_assets_precompile.txt index 2c6bc21b..bebd3a8f 100644 --- a/spec/support/outputs/rails_assets_precompile.txt +++ b/spec/support/outputs/rails_assets_precompile.txt @@ -1 +1 @@ -if\ diff\ \-qrN\ ".*/deploy/current/vendor/assets/"\ "\./vendor/assets/"\ 2>/dev/null\ &&\ diff\ \-qrN\ ".*/deploy/current/app/assets/"\ "\./app/assets/"\ 2>/dev/null\ &&\ diff\ \-qrN\ ".*/deploy/current/app/javascript/"\ "\./app/javascript/"\ 2>/dev/null &&\ diff\ \-qrN\ ".*/deploy/current/package.json"\ "\./package.json"\ 2>/dev/null\s*then\s*echo\ "\-\-\-\-\->\ Skipping\ asset\ precompilation"\s*else\s*echo\ "\-\-\-\-\->\ Precompiling\ asset\ files"\s*RAILS_ENV="production"\ bundle\ exec\ rake\ assets:precompile\s*fi +if\ diff\ \-qrN\ ".*/deploy/current/vendor/assets/"\ "\./vendor/assets/"\ 2>/dev/null\ &&\ diff\ \-qrN\ ".*/deploy/current/app/assets/"\ "\./app/assets/"\ 2>/dev/null\s*then\s*echo\ "\-\-\-\-\->\ Skipping\ asset\ precompilation"\s*else\s*echo\ "\-\-\-\-\->\ Precompiling\ asset\ files"\s*RAILS_ENV="production"\ bundle\ exec\ rake\ assets:precompile\s*fi diff --git a/spec/support/outputs/rails_assets_precompile_with_diff.txt b/spec/support/outputs/rails_assets_precompile_with_diff.txt index 5bf27393..2c6bd512 100644 --- a/spec/support/outputs/rails_assets_precompile_with_diff.txt +++ b/spec/support/outputs/rails_assets_precompile_with_diff.txt @@ -1,4 +1,4 @@ -if diff -qrN ".*/deploy/current/vendor/assets/" "\./vendor/assets/" 2>/dev/null && diff -qrN ".*/deploy/current/app/assets/" "\./app/assets/" 2>/dev/null && diff -qrN ".*/deploy/current/app/javascript/" "\./app/javascript/" 2>/dev/null && diff -qrN ".*/deploy/current/package\.json" "\./package\.json" 2>/dev/null +if diff -qrN ".*/deploy/current/vendor/assets/" "\./vendor/assets/" 2>/dev/null && diff -qrN ".*/deploy/current/app/assets/" "\./app/assets/" 2>/dev/null then echo "-----> Skipping asset precompilation" else diff --git a/tasks/mina/rails.rb b/tasks/mina/rails.rb index 66543190..2622c7c6 100644 --- a/tasks/mina/rails.rb +++ b/tasks/mina/rails.rb @@ -7,11 +7,11 @@ set :bundle_prefix, -> { %(RAILS_ENV="#{fetch(:rails_env)}" #{fetch(:bundle_bin)} exec) } set :rake, -> { "#{fetch(:bundle_prefix)} rake" } set :rails, -> { "#{fetch(:bundle_prefix)} rails" } -set :compiled_asset_path, ['public/assets', 'public/packs'] -set :asset_dirs, ['vendor/assets/', 'app/assets/', 'app/javascript/', 'package.json'] +set :compiled_asset_path, 'public/assets' +set :asset_dirs, ['vendor/assets/', 'app/assets/'] set :migration_dirs, ['db/migrate'] -set :shared_dirs, fetch(:shared_dirs, []).push('log', 'tmp/cache', 'node_modules', *fetch(:compiled_asset_path)) +set :shared_dirs, fetch(:shared_dirs, []).push('log', 'tmp/cache', fetch(:compiled_asset_path)) desc 'Starts an interactive console.' task :console do