Merge branch 'gzip-html' of kazu634/blog into master

This commit is contained in:
Kazuhiro MUSASHI 2020-05-01 00:06:04 +09:00 committed by Gitea
commit b94045fae6
2 changed files with 4 additions and 4 deletions

View File

@ -9,9 +9,9 @@ task :prod => [:prep] do
sh 'find public -type f -name "*.gz" -delete'
Find.find("#{Dir::pwd}/public") do |f|
if f =~ /\.(css|js|png|jpg|JPG|PNG|CSS|JS)$/ && FileTest.file?(f)
if f =~ /\.(css|js|png|jpg|html|JPG|PNG|CSS|JS|HTML)$/ && FileTest.file?(f)
sh "gzip -c #{f} > #{f}.gz"
sh "rm #{f}"
# sh "rm #{f}"
end
end

View File

@ -9,9 +9,9 @@ task :stag => [:prep] do
sh 'find public -type f -name "*.gz" -delete'
Find.find("#{Dir::pwd}/public") do |f|
if f =~ /\.(css|js|png|jpg|JPG|PNG|CSS|JS)$/ && FileTest.file?(f)
if f =~ /\.(css|js|png|jpg|html|JPG|PNG|CSS|JS|HTML)$/ && FileTest.file?(f)
sh "gzip -c #{f} > #{f}.gz"
sh "rm #{f}"
# sh "rm #{f}"
end
end