diff options
author | Eric Wong <e@80x24.org> | 2019-05-10 02:30:29 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-05-10 02:30:29 +0000 |
commit | 995eefdf9f09f1a4621e3aab0184c5ae2787ca0c (patch) | |
tree | d806646312d2d3a14fce975cc24bb8a55d470d47 /Rakefile | |
parent | 2ca6808f7d91b1dd44cd5b6eb31e9b272d865891 (diff) | |
download | yahns-995eefdf9f09f1a4621e3aab0184c5ae2787ca0c.tar.gz |
Might as well... this has been in use at YHBT.net for ~4 years at this point. And given nginx has new corporate overlords, maybe a decidedly non-enterprisey alternative is worth "marketing" :P Previous discussion from 2016: https://YHBT.net/yahns-public/20160220081619.GA10850@dcvr.yhbt.net/
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" }) |