autobuild 1.2.6 → 1.2.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ == Version 1.2.7
2
+ * fixes to documentation support
3
+ - '--no-doc' now works
4
+ - failures to generate documentation are now simple warnings, an error can be obtained
5
+ by setting Autobuild.doc_errors or by using the --doc-errors command line flag
6
+
1
7
  == Version 1.2.6
2
8
  * really fix the dependency problem
3
9
  * add documentation support in autotools
@@ -3,6 +3,6 @@ require 'autobuild/reporting'
3
3
  require 'autobuild/package'
4
4
 
5
5
  module Autobuild
6
- VERSION = "1.2.6" unless defined? Autobuild::VERSION
6
+ VERSION = "1.2.7" unless defined? Autobuild::VERSION
7
7
  end
8
8
 
@@ -18,6 +18,8 @@ end
18
18
  # debug:: more verbose than 'verbose': displays Rake's debugging output
19
19
  # do_update:: if we should update the packages
20
20
  # do_build:: if we should build the packages
21
+ # do_doc:: if we should produce the documentation
22
+ # doc_errors:: if errors during the documentation generation are treated as errors
21
23
  # daemonize:: if the build should go into daemon mode (only if the daemons gem is available)
22
24
  # clean_log:: remove all logs before starting the build
23
25
  # packages:: a list of packages to build specifically
@@ -26,7 +28,7 @@ end
26
28
  module Autobuild
27
29
  class << self
28
30
  %w{ nice srcdir prefix
29
- verbose debug do_update do_build only_doc do_doc
31
+ verbose debug do_update do_build only_doc do_doc doc_errors
30
32
  daemonize clean_log packages default_packages
31
33
  doc_prefix }.each do |name|
32
34
  attr_accessor name
@@ -46,7 +48,7 @@ module Autobuild
46
48
  :srcdir => Dir.pwd, :prefix => Dir.pwd, :logdir => nil,
47
49
  :verbose => false, :debug => false, :do_build => true, :do_update => true,
48
50
  :daemonize => false, :packages => [], :default_packages => [],
49
- :only_doc => false, :do_doc => true,
51
+ :only_doc => false, :do_doc => true, :doc_errors => false,
50
52
  :doc_prefix => 'doc' }
51
53
 
52
54
  @programs = Hash.new
@@ -154,7 +156,8 @@ module Autobuild
154
156
  opts.on("--no-update", "update already checked-out sources") do |@do_update| end
155
157
  opts.on("--no-build", "only prepare packages, do not build them") do |@do_build| end
156
158
  opts.on("--only-doc", "only generate documentation") do |@only_doc| end
157
- opts.on("--no-doc", "don't generate documentation") do |@doc_doc| end
159
+ opts.on("--no-doc", "don't generate documentation") do |@do_doc| end
160
+ opts.on("--doc-errors", "treat documentation failure as error") do |@doc_errors| end
158
161
 
159
162
  opts.separator ""
160
163
  opts.separator "Program output"
@@ -127,12 +127,21 @@ module Autobuild
127
127
  task "#{name}-doc" => "#{name}-build" do
128
128
  @installed_doc = false
129
129
  catch(:doc_disabled) do
130
- Dir.chdir(srcdir) do
131
- yield if block_given?
132
- end
133
-
134
- unless @installed_doc
135
- install_doc
130
+ begin
131
+ Dir.chdir(srcdir) do
132
+ yield if block_given?
133
+ end
134
+
135
+ unless @installed_doc
136
+ install_doc
137
+ end
138
+
139
+ rescue Exception => e
140
+ if Autobuild.doc_errors
141
+ raise
142
+ else
143
+ STDERR.puts "W: failed to generate documentation for #{name}"
144
+ end
136
145
  end
137
146
  end
138
147
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autobuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Joyeux
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-17 00:00:00 +02:00
12
+ date: 2008-10-29 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency