FIX: don't create digestless css files in production. With multisite setup, it's keeps getting swapped out for the current site, which is slow and pointless. Digestless css files are for auto-reload of css in dev env
This commit is contained in:
parent
5095de815d
commit
39bac5b36c
|
@ -45,7 +45,8 @@ class DiscourseStylesheets
|
||||||
end
|
end
|
||||||
|
|
||||||
def ensure_digestless_file
|
def ensure_digestless_file
|
||||||
unless File.exist?(stylesheet_fullpath_no_digest) && File.mtime(stylesheet_fullpath) == File.mtime(stylesheet_fullpath_no_digest)
|
# file without digest is only for auto-reloading css in dev env
|
||||||
|
unless Rails.env.production? || (File.exist?(stylesheet_fullpath_no_digest) && File.mtime(stylesheet_fullpath) == File.mtime(stylesheet_fullpath_no_digest))
|
||||||
FileUtils.cp(stylesheet_fullpath, stylesheet_fullpath_no_digest)
|
FileUtils.cp(stylesheet_fullpath, stylesheet_fullpath_no_digest)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue