提交 a875a3ab 编写于 作者: G Gabriele Cirulli

match and replace the "Updated" comment

上级 6a4b3ec3
...@@ -4,8 +4,8 @@ namespace :appcache do ...@@ -4,8 +4,8 @@ namespace :appcache do
desc "update the date in the appcache file (in the gh-pages branch)" desc "update the date in the appcache file (in the gh-pages branch)"
task :update do task :update do
appcache = File.read("cache.appcache") appcache = File.read("cache.appcache")
updated = "# Updated: #{DateTime.now}\n" updated = "# Updated: #{DateTime.now}"
File.write("cache.appcache", appcache.sub(/\A(#.*$\n)?/, updated)) File.write("cache.appcache", appcache.sub(/^# Updated:.*$/, updated))
end end
end end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册