match and replace the "Updated" comment
[2048.git] / Rakefile
blob:a/Rakefile -> blob:b/Rakefile
require "date" require "date"
   
namespace :appcache do 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
   
comments