Class: DeployGate::Commands::Deploy::Build
- Inherits:
-
Object
- Object
- DeployGate::Commands::Deploy::Build
- Defined in:
- lib/deploygate/commands/deploy/build.rb
Class Method Summary collapse
- .ios(workspaces, options) ⇒ void
- .over_xcode_8? ⇒ Boolean
- .print_no_install_xcode ⇒ Object
- .print_no_target ⇒ Object
- .run(args, options) ⇒ void
Class Method Details
.ios(workspaces, options) ⇒ void
This method returns an undefined value.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/deploygate/commands/deploy/build.rb', line 28 def ios(workspaces, ) DeployGate::Xcode::Export.check_local_certificates analyze = DeployGate::Xcode::Analyze.new(workspaces) target_scheme = analyze.scheme bundle_identifier = analyze.target_bundle_identifier xcode_provisioning_profile_uuid = analyze.target_xcode_setting_provisioning_profile_uuid provisioning_team = analyze.provisioning_team target_provisioning_profile = DeployGate::Xcode::Export.provisioning_profile(bundle_identifier, xcode_provisioning_profile_uuid, provisioning_team) method = DeployGate::Xcode::Export.method(target_provisioning_profile) codesigning_identity= nil provisioning_style = analyze.provisioning_style if (!over_xcode_8? && provisioning_style == nil) || provisioning_style == DeployGate::Xcode::Analyze::PROVISIONING_STYLE_MANUAL # Only run Provisioning Style is Manual or nil codesigning_identity = DeployGate::Xcode::Export.codesigning_identity(target_provisioning_profile) end ipa_path = DeployGate::Xcode::Ios.build(analyze, target_scheme, codesigning_identity, method) Push.upload([ipa_path], ) end |
.over_xcode_8? ⇒ Boolean
60 61 62 63 64 65 66 67 68 |
# File 'lib/deploygate/commands/deploy/build.rb', line 60 def over_xcode_8? version = Gym::Xcode.xcode_version if version == nil print_no_install_xcode exit 1 end version.split('.')[0].to_i >= 8 end |
.print_no_install_xcode ⇒ Object
70 71 72 73 74 |
# File 'lib/deploygate/commands/deploy/build.rb', line 70 def print_no_install_xcode puts '' puts HighLine.color(I18n.t('commands.deploy.build.print_no_install_xcode'), HighLine::YELLOW) puts '' end |
.print_no_target ⇒ Object
54 55 56 57 58 |
# File 'lib/deploygate/commands/deploy/build.rb', line 54 def print_no_target puts '' puts HighLine.color(I18n.t('commands.deploy.build.print_no_target'), HighLine::YELLOW) puts '' end |
.run(args, options) ⇒ void
This method returns an undefined value.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/deploygate/commands/deploy/build.rb', line 10 def run(args, ) # android/ios build work_dir = args.empty? ? Dir.pwd : args.first if DeployGate::Project.ios?(work_dir) root_path = DeployGate::Xcode::Ios.project_root_path(work_dir) workspaces = DeployGate::Xcode::Ios.find_workspaces(root_path) ios(workspaces, ) elsif DeployGate::Project.android?(work_dir) DeployGate::Android::GradleDeploy.new(work_dir, ).deploy else print_no_target end end |