diff options
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -3,7 +3,24 @@ require 'tempfile' include Rake::DSL -gendocs = %w(NEWS NEWS.atom.xml) +apidoc = { + 'doc/Yahns.html' => 'lib/yahns.rb', + 'doc/Yahns/ProxyPass.html' => 'lib/yahns/proxy_pass.rb' +} + +task apidoc.keys[0] => apidoc.values do + rdoc = ENV['rdoc'] || 'rdoc' + system("git", "set-file-times", *(apidoc.values)) + sh "#{rdoc} -f dark216" # dark216 requires olddoc 1.7+ + + apidoc.each do |dst, src| + src = File.stat(src) + File.utime(src.atime, src.mtime, dst) + end +end + +gendocs = %W(NEWS NEWS.atom.xml #{apidoc.keys[0]}) +task html: apidoc.keys[0] task rsync_docs: gendocs do dest = ENV["RSYNC_DEST"] || "yhbt.net:/srv/yhbt/yahns/" top = %w(INSTALL HACKING README COPYING) @@ -28,6 +45,7 @@ task rsync_docs: gendocs do files = `git ls-files Documentation/*.txt`.split(/\n/) files.concat(top) files.concat(gendocs) + files.concat(%w(doc/Yahns.html)) files.concat(%w(yahns yahns-rackup yahns_config).map! { |x| "Documentation/#{x}.txt" }) |