From a875a3ab96c6d818d27f194b7a9319eb29ae095b Mon Sep 17 00:00:00 2001 From: Gabriele Cirulli Date: Thu, 20 Mar 2014 22:59:00 +0100 Subject: [PATCH] match and replace the "Updated" comment --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 673b273..3e9851e 100644 --- a/Rakefile +++ b/Rakefile @@ -4,8 +4,8 @@ namespace :appcache do desc "update the date in the appcache file (in the gh-pages branch)" task :update do 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 -- GitLab