FIX: Sort filelists to ensure consistant asset precompilation hash (#13393)
Dir.glob does not guarantee file order and can change when ran on different machines. This means that running asset precompilation on the exact same codebase will output different content hashes.
This commit is contained in:
@@ -755,7 +755,7 @@ class Plugin::Instance
|
||||
root_path = "#{File.dirname(@path)}/assets/javascripts"
|
||||
admin_path = "#{File.dirname(@path)}/admin/assets/javascripts"
|
||||
|
||||
Dir.glob(["#{root_path}/**/*", "#{admin_path}/**/*"]) do |f|
|
||||
Dir.glob(["#{root_path}/**/*", "#{admin_path}/**/*"]).sort.each do |f|
|
||||
f_str = f.to_s
|
||||
if File.directory?(f)
|
||||
yield [f, true]
|
||||
|
||||
Reference in New Issue
Block a user