Sha256: 045a6538cff4ec871b75dfcd974025ed22c94219e617395fd545ec3c190802a5

Contents?: true

Size: 1.08 KB

Versions: 3

Compression:

Stored size: 1.08 KB

Contents

#! /usr/bin/ruby

require 'daemons'
require 'autobuild'

include Autobuild

DEFAULT_HTTP_PORT = 2000

# Load the command line options
conffile, *packages = Autobuild.commandline(ARGV)
Autobuild.packages = packages

# 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 ..."
    Daemons.daemonize 
end

Reporting << StdoutReporter.new
begin
    Reporting.report do
        load conffile

	if Autobuild.mail[:to]
	    Reporting << MailReporter.new(Autobuild.mail)
	end

	targets = ['import']
	targets += ['prepare', 'build'] if Autobuild.do_build
        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

        Reporting.success
    end
rescue Interrupt
end
 

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
autobuild-0.6.5 bin/autobuild
autobuild-0.6.6 bin/autobuild
autobuild-0.6.7 bin/autobuild