bin/autobuild in autobuild-1.2.15 vs bin/autobuild in autobuild-1.3.0
- old
+ new
@@ -13,10 +13,14 @@
# Load the command line options
conffile, *packages = Autobuild.commandline(ARGV)
Autobuild.packages = packages
+Autobuild.env_set 'PATH', *(ENV['PATH'].split(":"))
+Autobuild.env_set 'RUBYLIB', *(ENV['PATH'].split(":"))
+Autobuild.env_set 'PKG_CONFIG_PATH', *(ENV['PATH'].split(":"))
+
# make conffile an absolute path since daemonize mode makes
# / the current directory
conffile = File.expand_path(conffile, Dir.pwd)
if Autobuild.daemonize
puts "Going into daemon mode ..."
@@ -26,37 +30,13 @@
Reporting << StdoutReporter.new
begin
Reporting.report do
load conffile
- if Autobuild.mail[:to]
- if !Autobuild::HAS_RMAIL
- STDERR.puts "RMail is not available. Mail notification is disabled"
- else
- Reporting << MailReporter.new(Autobuild.mail)
- end
- end
+ packages = Autobuild.packages
+ packages = Autobuild.default_packages if packages.empty?
- if Autobuild.only_doc
- targets = ['doc']
- else
- targets = ['import']
- targets += ['prepare', 'build'] if Autobuild.do_build
- targets << 'doc' if Autobuild.do_doc
- end
- targets.each do |phase|
- packages = Autobuild.packages
- packages = Autobuild.default_packages if packages.empty?
-
- if packages.empty?
- Rake::Task[phase].invoke
- else
- packages.each do |pkg|
- Rake::Task["#{pkg}-#{phase}"].invoke
- end
- end
- end
-
+ Autobuild.apply(packages)
Reporting.success
end
rescue ThreadError
STDERR.puts "Rake failed with a ThreadError"
STDERR.puts "You may have a circular dependency in your packages"