Class: AppSendr::Command::Build
- Defined in:
- lib/appsendr/commands/build.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#app_dir ⇒ Object
Returns the value of attribute app_dir.
-
#app_name ⇒ Object
writeonly
Sets the attribute app_name.
-
#app_path ⇒ Object
Returns the value of attribute app_path.
-
#configuration ⇒ Object
Returns the value of attribute configuration.
-
#ipa_path ⇒ Object
Returns the value of attribute ipa_path.
-
#project_info ⇒ Object
writeonly
Sets the attribute project_info.
-
#provisioning_name ⇒ Object
Returns the value of attribute provisioning_name.
-
#provisioning_path ⇒ Object
Returns the value of attribute provisioning_path.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#appsendr, #ask, #confirm, #extract_app, #extract_option, #format_date, #initialize, #option_exists?
Methods included from Helpers
#credentials_file, #credentials_setup?, #display, #error, #has_project_droppr?, #home_directory, #in_project_dir?, #is_file_to_large?, #message, #project_appsendr, #project_appsendr_app, #read_app, #read_app_id, #require_in_project_and_no_droppr, #require_project, #require_project_dir, #require_project_droppr, #running_on_a_mac?, #running_on_windows?, #size_of_file
Constructor Details
This class inherits a constructor from AppSendr::Command::Base
Instance Attribute Details
#app_dir ⇒ Object
Returns the value of attribute app_dir.
7 8 9 |
# File 'lib/appsendr/commands/build.rb', line 7 def app_dir @app_dir end |
#app_name=(value) ⇒ Object
Sets the attribute app_name
7 8 9 |
# File 'lib/appsendr/commands/build.rb', line 7 def app_name=(value) @app_name = value end |
#app_path ⇒ Object
Returns the value of attribute app_path.
7 8 9 |
# File 'lib/appsendr/commands/build.rb', line 7 def app_path @app_path end |
#configuration ⇒ Object
Returns the value of attribute configuration.
7 8 9 |
# File 'lib/appsendr/commands/build.rb', line 7 def configuration @configuration end |
#ipa_path ⇒ Object
Returns the value of attribute ipa_path.
7 8 9 |
# File 'lib/appsendr/commands/build.rb', line 7 def ipa_path @ipa_path end |
#project_info=(value) ⇒ Object
Sets the attribute project_info
7 8 9 |
# File 'lib/appsendr/commands/build.rb', line 7 def project_info=(value) @project_info = value end |
#provisioning_name ⇒ Object
Returns the value of attribute provisioning_name.
7 8 9 |
# File 'lib/appsendr/commands/build.rb', line 7 def provisioning_name @provisioning_name end |
#provisioning_path ⇒ Object
Returns the value of attribute provisioning_path.
7 8 9 |
# File 'lib/appsendr/commands/build.rb', line 7 def provisioning_path @provisioning_path end |
Instance Method Details
#clean ⇒ Object
45 46 47 48 49 50 51 52 53 |
# File 'lib/appsendr/commands/build.rb', line 45 def clean require_project_dir("clean") require_project_droppr config = args.join(" ").strip if !config.empty? config = "-configuration #{config} " end %x[xcodebuild #{config} clean] end |
#index ⇒ Object
10 11 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 41 42 |
# File 'lib/appsendr/commands/build.rb', line 10 def index notify = option_exists?('--notify', false) is_public = option_exists?('--public', false) if require_project(1,"build","your active configuration name") @configuration = load_configuration "Building Xcode project with configuration #{@configuration}" compile(@configuration) @app_dir = path_to_app_dir @app_path = @app_dir+"/#{app_name}" if @app_name @notes = ask_for_notes "Building IPA File" @ipa_path = build_ipa_with_app_at_path info = app_info bundle_identifier ||= info['CFBundleIdentifier'] icon_path = icon_path(info) if is_file_to_large?(@ipa_path) upload_large_ipa(read_app_id,@ipa_path, profile_path,is_public,notify,@notes,bundle_identifier,icon_path) else "Uploading IPA" appsendr.upload(read_app_id,@ipa_path, profile_path,is_public,notify,@notes,bundle_identifier,icon_path) "App deployed" end FileUtils.rm_rf @ipa_path else error "No .app file was built for the configuration \"#{@configuration}\"." end end end |