Class: BetaBuilder::Tasks::Configuration
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- BetaBuilder::Tasks::Configuration
- Defined in:
- lib/beta_builder.rb
Instance Method Summary collapse
- #app_file_name ⇒ Object
- #archive_name ⇒ Object
- #build_arguments ⇒ Object
- #built_app_dsym_path ⇒ Object
- #built_app_path ⇒ Object
- #deploy_using(strategy_name, &block) ⇒ Object
- #derived_build_dir_from_build_output ⇒ Object
- #dist_path ⇒ Object
- #ipa_name ⇒ Object
- #ipa_path ⇒ Object
- #release_notes_text ⇒ Object
Instance Method Details
#app_file_name ⇒ Object
62 63 64 65 66 67 68 69 |
# File 'lib/beta_builder.rb', line 62 def app_file_name raise ArgumentError, "app_name or target must be set in the BetaBuilder configuration block" if app_name.nil? && target.nil? if app_name "#{app_name}.app" else "#{target}.app" end end |
#archive_name ⇒ Object
58 59 60 |
# File 'lib/beta_builder.rb', line 58 def archive_name app_name || target end |
#build_arguments ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/beta_builder.rb', line 43 def build_arguments args = "" if workspace_path raise "A scheme is required if building from a workspace" unless scheme args << "-workspace '#{workspace_path}' -scheme '#{scheme}' -configuration '#{configuration}'" else args = "-target '#{target}' -configuration '#{configuration}' -sdk iphoneos" args << " -project #{project_file_path}" if project_file_path end args << " -arch \"#{arch}\"" unless arch.nil? args end |
#built_app_dsym_path ⇒ Object
92 93 94 |
# File 'lib/beta_builder.rb', line 92 def built_app_dsym_path "#{built_app_path}.dSYM" end |
#built_app_path ⇒ Object
79 80 81 82 83 84 85 |
# File 'lib/beta_builder.rb', line 79 def built_app_path if build_dir == :derived "#{derived_build_dir_from_build_output}/#{configuration}-iphoneos/#{app_file_name}" else "#{build_dir}/#{configuration}-iphoneos/#{app_file_name}" end end |
#deploy_using(strategy_name, &block) ⇒ Object
104 105 106 107 108 109 110 111 |
# File 'lib/beta_builder.rb', line 104 def deploy_using(strategy_name, &block) if DeploymentStrategies.valid_strategy?(strategy_name.to_sym) self.deployment_strategy = DeploymentStrategies.build(strategy_name, self) self.deployment_strategy.configure(&block) else raise "Unknown deployment strategy '#{strategy_name}'." end end |
#derived_build_dir_from_build_output ⇒ Object
87 88 89 90 |
# File 'lib/beta_builder.rb', line 87 def derived_build_dir_from_build_output output = BuildOutputParser.new(File.read("build.output")) output.build_output_dir end |
#dist_path ⇒ Object
96 97 98 |
# File 'lib/beta_builder.rb', line 96 def dist_path File.join("pkg/dist") end |
#ipa_name ⇒ Object
71 72 73 74 75 76 77 |
# File 'lib/beta_builder.rb', line 71 def ipa_name if app_name "#{app_name}.ipa" else "#{target}.ipa" end end |
#ipa_path ⇒ Object
100 101 102 |
# File 'lib/beta_builder.rb', line 100 def ipa_path File.join(dist_path, ipa_name) end |
#release_notes_text ⇒ Object
39 40 41 42 |
# File 'lib/beta_builder.rb', line 39 def release_notes_text return release_notes.call if release_notes.is_a? Proc release_notes end |