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
This commit is contained in:
Jeff Wong 2024-10-05 08:50:33 +09:00 committed by GitHub
parent e75571c401
commit 91ac382d83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}"