diff options
| author | Zack Hobson | 2014-02-04 09:24:34 -0800 |
|---|---|---|
| committer | Zack Hobson | 2014-02-04 09:30:28 -0800 |
| commit | 855e636b96740de63e70f870113ed8fb785eb0c1 (patch) | |
| tree | d0f7f47ccbc486f5e9e432fb6de9e15c6189928c /Rakefile | |
| parent | 4793f74ff23cd4cbb2c46498aadef8fdf4d6030a (diff) | |
| download | hcl-855e636b96740de63e70f870113ed8fb785eb0c1.tar.bz2 | |
generate manpage from README
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -10,15 +10,28 @@ Rake::TestTask.new do |t| end task :default => :test +# process the README into a manual page using ronn require 'ronn' task :man do print "Writing manual page..." + readme = File.read('README.markdown') + head, content = readme.split("## SYNOPSIS\n") + content.prepend <<-END +hcl(1) -- Track time with Harvest time sheets +============================================= + +## SYNOPSIS + END + FileUtils.mkdir_p('man') + File.write('man/hcl.1.ronn', content) File.open('man/hcl.1','w').tap do |man| man.write Ronn::Document.new('man/hcl.1.ronn').to_roff end puts "done." end task 'build:gem' => [:man] +task 'install' => [:man] +task 'release' => [:man] require 'yard' YARD::Rake::YardocTask.new |
