Skip to content

Commit

Permalink
match and replace the "Updated" comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielecirulli committed Mar 20, 2014
1 parent 6a4b3ec commit a875a3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a875a3a

Please sign in to comment.