From 1ef7ea327d07a9a11c0e36319ed2afef6c430e24 Mon Sep 17 00:00:00 2001 From: Lovro Bikic Date: Tue, 3 Oct 2023 14:23:55 +0200 Subject: [PATCH] Revert "Support Rails 6 asset recompilation through webpacker (#656)" This reverts commit 5f413c2e59af64de8cc754d1928bd0203aa32e79. --- spec/support/outputs/rails_assets_precompile.txt | 2 +- tasks/mina/rails.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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/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