forked from orocos-toolchain/orogen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
74 lines (63 loc) · 2.25 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
require './lib/orogen/version'
require 'shellwords'
task :setup do
begin
require 'typelib'
require 'orogen'
STDERR.puts "oroGen is ready to use"
rescue Exception => e
STDERR.puts "cannot load oroGen"
STDERR.puts " did you install Typelib's Ruby bindings and update the RUBYLIB environment variable accordingly ?"
STDERR.puts " did you add #{File.expand_path("lib", File.dirname(__FILE__))} to RUBYLIB ?"
STDERR.puts "the error is: #{e.message}"
e.backtrace.each do |line|
STDERR.puts " #{line}"
end
exit(1)
end
end
begin
require 'hoe'
Hoe::plugin :yard
Hoe::RUBY_FLAGS.gsub!(/-w/, '')
config = Hoe.spec 'orogen' do
self.developer "Sylvain Joyeux", "[email protected]"
self.summary = 'Component generation for Orocos::RTT'
self.description = paragraphs_of('README.markdown', 3..6).join("\n\n")
self.changes = paragraphs_of('History.txt', 0..1).join("\n\n")
licenses << "GPLv2 or later"
extra_deps <<
['utilrb', '>= 1.3.4'] <<
['rake', '>= 0.8'] <<
['hoe-yard', '>= 0.1.2']
extra_dev_deps <<
['flexmock', '>= 0.8.6']
end
Rake.clear_tasks(/^default$/)
namespace 'dist' do
Rake.clear_tasks(/dist:publish_docs/)
Rake.clear_tasks(/dist:(re|clobber_|)docs/)
task 'publish_docs' => 'redocs' do
if !system('doc/misc/update_github')
raise "cannot update the gh-pages branch for GitHub"
end
if !system('git', 'push', '[email protected]:doudou/orogen.git', '+gh-pages')
raise "cannot push the documentation"
end
end
end
config.test_globs = ['test/suite.rb']
task :doc => :yard
rescue LoadError
STDERR.puts "cannot load the Hoe gem. Distribution is disabled"
rescue Exception => e
if e.message !~ /\.rubyforge/
STDERR.puts "WARN: cannot load the Hoe gem, or Hoe fails. Publishing tasks are disabled"
STDERR.puts "WARN: error message is: #{e.message}"
end
end
task :default => :setup
require 'utilrb/doc/rake'
Utilrb.doc :include => ['lib/**/*.rb'],
:title => 'oroGen',
:plugins => ['utilrb']