Skip to content

Commit 6a4b3ec

Browse files
add basic rake file with appcache:update task
1 parent 95ca668 commit 6a4b3ec

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Rakefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
require "date"
2+
3+
namespace :appcache do
4+
desc "update the date in the appcache file (in the gh-pages branch)"
5+
task :update do
6+
appcache = File.read("cache.appcache")
7+
updated = "# Updated: #{DateTime.now}\n"
8+
9+
File.write("cache.appcache", appcache.sub(/\A(#.*$\n)?/, updated))
10+
end
11+
end

0 commit comments

Comments
 (0)