class Octobuild::Builder
Public Class Methods
new()
click to toggle source
# File lib/octobuild.rb, line 6 def initialize @installer = XcodeInstall::Installer.new end
Public Instance Methods
build(versions = nil)
click to toggle source
# File lib/octobuild.rb, line 10 def build(versions = nil) versions = requested_versions if versions.nil? versions.each do |version| puts "Building with Xcode #{version}..." xcode = @installer.installed_versions.find { |x| x.version == version } if xcode.nil? puts 'Installing Xcode...' @installer.install_version(version, false) end system(command(xcode)) end end
Private Instance Methods
command(xcode)
click to toggle source
# File lib/octobuild.rb, line 27 def command(xcode) "DEVELOPER_DIR='#{xcode.path}' #{ARGV.join(' ')}" end
requested_versions()
click to toggle source
# File lib/octobuild.rb, line 31 def requested_versions if ENV['VERSIONS'].nil? @installer.installed_versions.map(&:version) else ENV['VERSIONS'].split(' ') end end