Merge branch 'master' of uflows.com:/var/git/qwaiter
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
task dedigest_assets: :environment do
|
||||
extensions = %w[jpg png js css gif]
|
||||
Dir.glob(Rails.root.join('public/assets/**', "*.{#{extensions.join(',')}}")).each do |asset_path|
|
||||
next unless asset_path =~ /-[a-f0-9]{32}\.(#{extensions.join('|')})\Z/
|
||||
dedigest_path = asset_path.sub(/-[a-f0-9]{32}/, '')
|
||||
next unless asset_path =~ /-[a-f0-9]{32,64}\.(#{extensions.join('|')})\Z/
|
||||
dedigest_path = asset_path.sub(/-[a-f0-9]{32,64}/, '')
|
||||
`cp '#{asset_path}' '#{dedigest_path}' 2>/dev/null`
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user