forked from jdigger/git-process
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
32 lines (27 loc) · 892 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env rake
#require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'yard'
require 'yard/rake/yardoc_task'
require 'fileutils'
require File.expand_path('../lib/git-process/version', __FILE__)
desc 'Default: run specs.'
task :default => :spec
desc "Run specs"
RSpec::Core::RakeTask.new do |t|
t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
end
desc "Create docs"
YARD::Rake::YardocTask.new
desc 'Update manpage from asciidoc file'
task :manpage do
FileUtils::rm_r('man') if File.directory?('man')
FileUtils::mkdir('man')
%x[find docs/ -type f -exec a2x -a version=#{GitProc::Version::STRING} -f manpage -D man {} \\;]
end
desc 'Update htmldoc from asciidoc file'
task :htmldoc do
FileUtils::rm_r('htmldoc') if File.directory?('htmldoc')
FileUtils::mkdir('htmldoc')
system('find docs/ -type f -exec a2x -f xhtml -D htmldoc {} \;')
end