From 91ac382d83bef9d0c723a4297ab5c68378d512f1 Mon Sep 17 00:00:00 2001 From: Jeff Wong Date: Sat, 5 Oct 2024 08:50:33 +0900 Subject: [PATCH] DEV: update compile steps (#29031) Remove emoji.clear cache calls as data.js.es6.erb hasn't existed in a while. Emoji data is now compiled separately via javascript rake tasks. Skip db and redis precompilation when no db is present --- lib/tasks/assets.rake | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index 6124cc9e2a8..61b840dd5f7 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -61,10 +61,6 @@ task "assets:precompile:before": %w[ STDERR.puts "Purging temp files" `rm -fr #{Rails.root}/tmp/cache` - # Ensure we clear emoji cache before pretty-text/emoji/data.js.es6.erb - # is recompiled - Emoji.clear_cache - $node_compress = !ENV["SKIP_NODE_UGLIFY"] unless ENV["USE_SPROCKETS_UGLIFY"] @@ -96,7 +92,7 @@ task "assets:precompile:css" => "environment" do # cause CSS uses asset_path Rails.application.assets_manifest.reload - if ENV["DONT_PRECOMPILE_CSS"] == "1" + if ENV["DONT_PRECOMPILE_CSS"] == "1" || ENV["SKIP_DB_AND_REDIS"] == "1" STDERR.puts "Skipping CSS precompilation, ensure CSS lives in a shared directory across hosts" else STDERR.puts "Start compiling CSS: #{Time.zone.now}"