From 6a4b3ec322f41c9bb69e40ec0cc14a69b9425594 Mon Sep 17 00:00:00 2001 From: Gabriele Cirulli Date: Thu, 20 Mar 2014 19:57:48 +0100 Subject: [PATCH] add basic rake file with appcache:update task --- Rakefile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Rakefile diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..673b273 --- /dev/null +++ b/Rakefile @@ -0,0 +1,11 @@ +require "date" + +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" + + File.write("cache.appcache", appcache.sub(/\A(#.*$\n)?/, updated)) + end +end -- GitLab