Skip to content

Commit

Permalink
Revert "Support Rails 6 asset recompilation through webpacker" (#723)
Browse files Browse the repository at this point in the history
* Revert "Support Rails 6 asset recompilation through webpacker  (#656)"

This reverts commit 5f413c2.

* Update expected output
  • Loading branch information
lovro-bikic authored Oct 3, 2023
1 parent 2e87ff5 commit 01f2056
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spec/support/outputs/rails_assets_precompile.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion spec/support/outputs/rails_assets_precompile_with_diff.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions tasks/mina/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 01f2056

Please sign in to comment.