Class: BetaBuilder::Tasks
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- BetaBuilder::Tasks
- Defined in:
- lib/beta_builder.rb
Defined Under Namespace
Classes: Configuration
Instance Method Summary collapse
-
#initialize(namespace = :beta) {|@configuration| ... } ⇒ Tasks
constructor
A new instance of Tasks.
- #xcodebuild(*args) ⇒ Object
Constructor Details
#initialize(namespace = :beta) {|@configuration| ... } ⇒ Tasks
Returns a new instance of Tasks.
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 |
# File 'lib/beta_builder.rb', line 12 def initialize(namespace = :beta, &block) @configuration = Configuration.new( :configuration => "Adhoc", :build_dir => "build", :xcodebuild_path => "/usr/bin/xcodebuild", :xcrun_path => "/usr/bin/xcrun", :xcodeargs => nil, :packageargs => nil, :project_file_path => nil, :workspace_name => nil, :workspace_path => nil, :ipa_destination_path => "./pkg", :zip_ipa_and_dsym => true, :scheme => nil, :app_name => nil, :arch => nil, :skip_clean => ENV.fetch('SKIPCLEAN', false), :verbose => ENV.fetch('VERBOSE', false), :sdk => "iphoneos", :app_info_plist => nil, :scm => nil, :skip_scm_tagging => true, :skip_version_increment => true, :spec_file => nil ) @namespace = namespace yield @configuration if block_given? define end |
Instance Method Details
#xcodebuild(*args) ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/beta_builder.rb', line 42 def xcodebuild(*args) # we're using tee as we still want to see our build output on screen cmd = [] cmd << @configuration.xcodebuild_path cmd.concat args puts "Running: #{cmd.join(" ")}" if @configuration.verbose cmd << "2>&1 %s build.output" % (@configuration.verbose ? '| tee' : '>') cmd = cmd.join(" ") system(cmd) end |