deploygate 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5fc702cebcdafb20d3cd3736741ae4d81f3eea31
4
- data.tar.gz: 802a59392ee1a077430e6577e76755802a08c172
2
+ SHA256:
3
+ metadata.gz: 17db64ccad3b6dbc67aca1430d24b86a35f278c91356633afd71635e1218dc41
4
+ data.tar.gz: 409f3792317f8bf0d2e73e12ba712c56f8e66e93d7c0116ca9d09d084f6993a5
5
5
  SHA512:
6
- metadata.gz: 8714f544dc76ab758e121b97ae52a9606afe7c958c171bde3729f6b04a2f511074509eeb7726999a0fd347e222e03991435beaede18107a5dbb397854a9404e3
7
- data.tar.gz: 4d20f82f1b5ca3a9f520fa47a24f168d0d54437df297d0c020be6c2ce9487e51c55dccaed01acb64e7fa6071e1b328a5d9b1f41f86edbf8aa757947bf8e3a447
6
+ metadata.gz: 7391995661f77a94f21deead895a83c7e2678e5482b48acb4afb83f2060cc85eb3043b7ac0a266d08078ed47d60c95941f469117d016752a66c2c0411fd94603
7
+ data.tar.gz: cb0fc091a7a2e83be4aab162cf2a0a596588181812af3ceadda88521511f30f2b34163c73dde39686de027366e4952a8721b6a9c936d597dedcf4f8cea75b9fe
@@ -57,6 +57,8 @@ en:
57
57
  No deploy target found.
58
58
  Please run dg on the root directory of Android/iOS project or specify .apk/.ipa file to deploy.
59
59
  print_no_install_xcode: 'Unable to locate Xcode. Please make sure to have Xcode installed on your machine'
60
+ select_method:
61
+ title: 'Please select a export method'
60
62
  push:
61
63
  upload:
62
64
  loading: 'Uploading to %{owner}..'
@@ -65,9 +65,13 @@ module DeployGate
65
65
  end
66
66
 
67
67
  def build!(bundle_id, args, options)
68
+ app = DeployGate::Xcode::MemberCenters::App.new(bundle_id)
69
+ app.create! unless app.created?
70
+
68
71
  DeployGate::Xcode::MemberCenters::ProvisioningProfile.new(bundle_id).create!
69
72
  team = DeployGate::Xcode::MemberCenter.instance.team
70
73
  DeployGate::Xcode::Export.clean_provisioning_profiles(bundle_id, team)
74
+
71
75
  DeployGate::Commands::Deploy::Build.run(args, options)
72
76
  end
73
77
 
@@ -38,23 +38,37 @@ module DeployGate
38
38
  analyze = DeployGate::Xcode::Analyze.new(workspaces, build_configuration, target_scheme)
39
39
  target_scheme = analyze.scheme
40
40
 
41
- bundle_identifier = analyze.target_bundle_identifier
42
- xcode_provisioning_profile_uuid = analyze.target_xcode_setting_provisioning_profile_uuid
43
-
44
- provisioning_team = analyze.provisioning_team
45
- target_provisioning_profile = DeployGate::Xcode::Export.provisioning_profile(bundle_identifier, xcode_provisioning_profile_uuid, provisioning_team)
46
-
47
- method = DeployGate::Xcode::Export.method(target_provisioning_profile)
48
-
41
+ # TODO: Support export method option (ex: --method adhoc)
42
+ method = nil
49
43
  codesigning_identity= nil
50
44
  provisioning_style = analyze.provisioning_style
51
- if (!over_xcode_8? && provisioning_style == nil) ||
45
+ if (!over_xcode?(8) && provisioning_style == nil) ||
52
46
  provisioning_style == DeployGate::Xcode::Analyze::PROVISIONING_STYLE_MANUAL
47
+
53
48
  # Only run Provisioning Style is Manual or nil
49
+ bundle_identifier = analyze.target_bundle_identifier
50
+ xcode_provisioning_profile_uuid = analyze.target_xcode_setting_provisioning_profile_uuid
51
+ provisioning_team = analyze.provisioning_team
52
+ target_provisioning_profile = DeployGate::Xcode::Export.provisioning_profile(
53
+ bundle_identifier,
54
+ xcode_provisioning_profile_uuid,
55
+ provisioning_team
56
+ )
57
+
58
+ method = DeployGate::Xcode::Export.method(target_provisioning_profile)
54
59
  codesigning_identity = DeployGate::Xcode::Export.codesigning_identity(target_provisioning_profile)
60
+ else
61
+ method = select_method
55
62
  end
56
63
 
57
- ipa_path = DeployGate::Xcode::Ios.build(analyze, target_scheme, codesigning_identity, build_configuration, method)
64
+ ipa_path = DeployGate::Xcode::Ios.build(
65
+ analyze,
66
+ target_scheme,
67
+ codesigning_identity,
68
+ build_configuration,
69
+ method,
70
+ over_xcode?(9) && codesigning_identity.nil?
71
+ )
58
72
  Push.upload([ipa_path], options)
59
73
  end
60
74
 
@@ -64,14 +78,14 @@ module DeployGate
64
78
  puts ''
65
79
  end
66
80
 
67
- def over_xcode_8?
81
+ def over_xcode?(version_number)
68
82
  version = Gym::Xcode.xcode_version
69
83
  if version == nil
70
84
  print_no_install_xcode
71
85
  exit 1
72
86
  end
73
87
 
74
- version.split('.')[0].to_i >= 8
88
+ version.split('.')[0].to_i >= version_number
75
89
  end
76
90
 
77
91
  def print_no_install_xcode
@@ -79,6 +93,22 @@ module DeployGate
79
93
  puts HighLine.color(I18n.t('commands.deploy.build.print_no_install_xcode'), HighLine::YELLOW)
80
94
  puts ''
81
95
  end
96
+
97
+ def select_method
98
+ result = nil
99
+ cli = HighLine.new
100
+ cli.choose do |menu|
101
+ menu.prompt = I18n.t('commands.deploy.build.select_method.title')
102
+ menu.choice(DeployGate::Xcode::Export::AD_HOC) {
103
+ result = DeployGate::Xcode::Export::AD_HOC
104
+ }
105
+ menu.choice(DeployGate::Xcode::Export::ENTERPRISE) {
106
+ result = DeployGate::Xcode::Export::ENTERPRISE
107
+ }
108
+ end
109
+
110
+ result
111
+ end
82
112
  end
83
113
  end
84
114
  end
@@ -1,3 +1,3 @@
1
1
  module DeployGate
2
- VERSION = '0.6.2'
2
+ VERSION = '0.6.3'
3
3
  end
@@ -14,8 +14,14 @@ module DeployGate
14
14
  # @param [String] codesigning_identity
15
15
  # @param [String] build_configuration
16
16
  # @param [String] export_method
17
+ # @param [Boolean] allow_provisioning_updates
17
18
  # @return [String]
18
- def build(ios_analyze, target_scheme, codesigning_identity, build_configuration = nil, export_method = DeployGate::Xcode::Export::AD_HOC)
19
+ def build(ios_analyze,
20
+ target_scheme,
21
+ codesigning_identity,
22
+ build_configuration = nil,
23
+ export_method = DeployGate::Xcode::Export::AD_HOC,
24
+ allow_provisioning_updates = false)
19
25
  raise NotSupportExportMethodError, 'Not support export' unless DeployGate::Xcode::Export::SUPPORT_EXPORT_METHOD.include?(export_method)
20
26
 
21
27
  values = {
@@ -25,6 +31,8 @@ module DeployGate
25
31
  scheme: target_scheme
26
32
  }
27
33
  values[:codesigning_identity] = codesigning_identity if codesigning_identity
34
+ values[:export_xcargs] = '-allowProvisioningUpdates' if allow_provisioning_updates
35
+
28
36
  v = FastlaneCore::Configuration.create(Gym::Options.available_options, values)
29
37
 
30
38
  begin
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deploygate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - deploygate
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-21 00:00:00.000000000 Z
11
+ date: 2018-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -419,7 +419,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
419
419
  version: '0'
420
420
  requirements: []
421
421
  rubyforge_project:
422
- rubygems_version: 2.6.13
422
+ rubygems_version: 2.7.5
423
423
  signing_key:
424
424
  specification_version: 4
425
425
  summary: A command-line interface for DeployGate