deploygate 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/config/locales/en.yml +4 -4
- data/lib/deploygate/version.rb +1 -1
- data/lib/deploygate/xcode/analyze.rb +12 -2
- data/lib/deploygate/xcode/export.rb +11 -7
- data/lib/deploygate/xcode/member_centers/provisioning_profile.rb +11 -5
- data/spec/deploygate/xcode/export_spec.rb +25 -3
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cd91c1e3ea9e8f1bb159e257e3bc6f3eeb557b89c654caabb8aea817d1470e7
|
4
|
+
data.tar.gz: afc969266c279b32687df44fa78265ca843bb210b9e457195296abdc0c489d0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf82535795d7295dfdc325ca359b950ce599453e6927a02c02430a5a95d45fdeddd3ac4d67ab0626b1fc9f8e71e4bfbfdd1050b2b99bc75f301aed0a6f029859
|
7
|
+
data.tar.gz: c0e6d977d35e49acd25e4ee4cec35c6925535e4968964f172a0bff1bc7974b27fc834690a3d9dbd7ed0b6748ee8a95d75d64a9e2189c43369e9efc7625695645
|
data/.travis.yml
CHANGED
data/config/locales/en.yml
CHANGED
@@ -142,16 +142,16 @@ en:
|
|
142
142
|
choice: '%{team_name} %{team_id}'
|
143
143
|
check_local_certificates:
|
144
144
|
not_local_install_certificate:
|
145
|
-
error_message: 'Error: No applicable iPhone Distribution certificate found on your Mac.'
|
145
|
+
error_message: 'Error: No applicable iPhone Distribution or Apple Distribution certificate found on your Mac.'
|
146
146
|
note: |
|
147
|
-
No "iPhone Distribution" certificate and/or corresponding private key installed locally.
|
147
|
+
No "iPhone Distribution" or "Apple Distribution" certificate and/or corresponding private key installed locally.
|
148
148
|
To sign your application code, make sure you have installed them and available in your Keychain.
|
149
149
|
|
150
150
|
See also: https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
|
151
151
|
conflict_certificate:
|
152
152
|
error_message: 'Error: Too many certificates found.'
|
153
153
|
note: |
|
154
|
-
You have more than one "iPhone Distribution" certificate installed on your Mac.
|
154
|
+
You have more than one "iPhone Distribution" or "Apple Distribution" certificate installed on your Mac.
|
155
155
|
Please remove other unnecessary certificates from your Keychain.
|
156
156
|
clean_provisioning_profiles:
|
157
157
|
start: 'Cleaning local Provisioning Profiles...'
|
@@ -171,5 +171,5 @@ en:
|
|
171
171
|
Note: Your password will be stored to your Keychain and never be sent to DeployGate.
|
172
172
|
email: 'Email: '
|
173
173
|
provisioning_profile:
|
174
|
-
not_installed_certificate_error: 'No iPhone Distribution Certificate associated with private key was found in local Keychain'
|
174
|
+
not_installed_certificate_error: 'No iPhone Distribution or Apple Distribution Certificate associated with private key was found in local Keychain'
|
175
175
|
not_exist_uuid_provisioning_profile_error: 'No provisioning profile found for the specified UUID (%{uuid})'
|
data/lib/deploygate/version.rb
CHANGED
@@ -53,7 +53,7 @@ module DeployGate
|
|
53
53
|
identity
|
54
54
|
end
|
55
55
|
|
56
|
-
#
|
56
|
+
# TODO: Need to support UDID additions for watchOS and App Extension
|
57
57
|
# @return [String]
|
58
58
|
def target_bundle_identifier
|
59
59
|
bundle_identifier = nil
|
@@ -96,7 +96,17 @@ module DeployGate
|
|
96
96
|
|
97
97
|
Xcodeproj::Project.open(@xcodeproj).targets.each do |target|
|
98
98
|
target.build_configuration_list.build_configurations.each do |build_configuration|
|
99
|
-
|
99
|
+
# Used the following code as an example
|
100
|
+
# https://github.com/fastlane/fastlane/blob/2.148.1/gym/lib/gym/code_signing_mapping.rb#L138
|
101
|
+
current = build_configuration.build_settings
|
102
|
+
next if gym.test_target?(current)
|
103
|
+
sdk_root = build_configuration.resolve_build_setting("SDKROOT", target)
|
104
|
+
next unless gym.same_platform?(sdk_root)
|
105
|
+
next unless specified_configuration == build_configuration.name
|
106
|
+
|
107
|
+
# If SKIP_INSTALL is true, it is an app extension or watch app
|
108
|
+
next if current["SKIP_INSTALL"]
|
109
|
+
|
100
110
|
block.call(build_configuration, target)
|
101
111
|
end
|
102
112
|
end
|
@@ -80,7 +80,7 @@ module DeployGate
|
|
80
80
|
certificates = installed_certificates()
|
81
81
|
ids = []
|
82
82
|
certificates.each do |current|
|
83
|
-
next unless current.match(/iPhone Distribution:/)
|
83
|
+
next unless current.match(/iPhone Distribution:/) || current.match(/Apple Distribution:/)
|
84
84
|
begin
|
85
85
|
(ids << current.match(/.*\) (.*) \".*/)[1])
|
86
86
|
rescue
|
@@ -92,12 +92,12 @@ module DeployGate
|
|
92
92
|
end
|
93
93
|
|
94
94
|
# @return [Array]
|
95
|
-
def
|
95
|
+
def installed_distribution_conflicting_certificates_by(distribution_name)
|
96
96
|
certificates = installed_certificates()
|
97
97
|
names = []
|
98
98
|
certificates.each do |current|
|
99
99
|
begin
|
100
|
-
names << current.match(/(
|
100
|
+
names << current.match(/(#{distribution_name}:.*)/)[1]
|
101
101
|
rescue
|
102
102
|
end
|
103
103
|
end
|
@@ -106,7 +106,7 @@ module DeployGate
|
|
106
106
|
conflicting_certificates = []
|
107
107
|
certificates.each do |current|
|
108
108
|
begin
|
109
|
-
name = current.match(/(
|
109
|
+
name = current.match(/(#{distribution_name}:.*)/)[1]
|
110
110
|
next unless conflicting_names.include?(name)
|
111
111
|
conflicting_certificates << current
|
112
112
|
rescue
|
@@ -255,12 +255,16 @@ module DeployGate
|
|
255
255
|
exit
|
256
256
|
end
|
257
257
|
|
258
|
-
|
259
|
-
|
258
|
+
iphone_conflicting_certificates = installed_distribution_conflicting_certificates_by('iPhone Distribution')
|
259
|
+
apple_conflicting_certificates = installed_distribution_conflicting_certificates_by('Apple Distribution')
|
260
|
+
if iphone_conflicting_certificates.count > 0 || apple_conflicting_certificates.count > 0
|
260
261
|
puts HighLine.color(I18n.t('xcode.export.check_local_certificates.conflict_certificate.error_message'), HighLine::RED)
|
261
262
|
puts ''
|
262
263
|
puts I18n.t('xcode.export.check_local_certificates.conflict_certificate.note')
|
263
|
-
|
264
|
+
iphone_conflicting_certificates.each do |certificate|
|
265
|
+
puts certificate
|
266
|
+
end
|
267
|
+
apple_conflicting_certificates.each do |certificate|
|
264
268
|
puts certificate
|
265
269
|
end
|
266
270
|
puts ""
|
@@ -35,16 +35,22 @@ module DeployGate
|
|
35
35
|
|
36
36
|
# @return [Array]
|
37
37
|
def all_create
|
38
|
-
if @member_center.adhoc?
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
38
|
+
prod_certs = if @member_center.adhoc?
|
39
|
+
@member_center.launcher.certificate.all.select{|cert|
|
40
|
+
cert.class == Spaceship::Portal::Certificate::Production ||
|
41
|
+
cert.class == Spaceship::Portal::Certificate::AppleDistribution
|
42
|
+
}
|
43
|
+
else
|
44
|
+
@member_center.launcher.certificate.all.select{|cert|
|
45
|
+
cert.class == Spaceship::Portal::Certificate::InHouse
|
46
|
+
}
|
47
|
+
end
|
43
48
|
|
44
49
|
# check local install certificate
|
45
50
|
FileUtils.mkdir_p(CERTIFICATE_OUTPUT_PATH)
|
46
51
|
distribution_cert_ids = []
|
47
52
|
prod_certs.each do |cert|
|
53
|
+
next if cert.expires < Time.now
|
48
54
|
path = File.join(CERTIFICATE_OUTPUT_PATH, "#{cert.id}.cer")
|
49
55
|
raw_data = cert.download_raw
|
50
56
|
File.write(path, raw_data)
|
@@ -61,6 +61,7 @@ describe DeployGate::Xcode::Export do
|
|
61
61
|
before do
|
62
62
|
@distribution_certificate_id = 'distribution_certificate_id'
|
63
63
|
@distribution_certificate = " 1) #{@distribution_certificate_id} \"iPhone Distribution: DeployGate Inc.\""
|
64
|
+
@apple_distribution_certificate = " 1) #{@distribution_certificate_id} \"Apple Distribution: DeployGate Inc.\""
|
64
65
|
@not_distribution_certificate = " 1) xxxxxxxxxxxxxx \"iPhone Developer: DeployGate Inc.\""
|
65
66
|
end
|
66
67
|
it "not installed distribution certificate" do
|
@@ -74,23 +75,44 @@ describe DeployGate::Xcode::Export do
|
|
74
75
|
ids = DeployGate::Xcode::Export.installed_distribution_certificate_ids
|
75
76
|
expect(ids).to eql([@distribution_certificate_id])
|
76
77
|
end
|
78
|
+
|
79
|
+
it "installed apple distribution certificate" do
|
80
|
+
allow(DeployGate::Xcode::Export).to receive(:installed_certificates).and_return([@apple_distribution_certificate, @not_distribution_certificate])
|
81
|
+
|
82
|
+
ids = DeployGate::Xcode::Export.installed_distribution_certificate_ids
|
83
|
+
expect(ids).to eql([@distribution_certificate_id])
|
84
|
+
end
|
77
85
|
end
|
78
86
|
|
79
|
-
describe "#
|
87
|
+
describe "#installed_distribution_conflicting_certificates_by" do
|
80
88
|
before do
|
81
89
|
@distribution_certificate = " 1) xxxxxxxxxx \"iPhone Distribution: DeployGate Inc.\""
|
82
90
|
@distribution_certificate2 = " 2) yyyyyyyyyyyy \"iPhone Distribution: DeployGate Inc.\""
|
83
91
|
@distribution_certificate3 = " 2) yyyyyyyyyyyy \"iPhone Distribution: DeployGate Inc2.\""
|
92
|
+
|
93
|
+
@apple_distribution_certificate = " 1) xxxxxxxxxxx \"Apple Distribution: DeployGate Inc.\""
|
94
|
+
@apple_distribution_certificate2 = " 2) yyyyyyyyyyyy \"Apple Distribution: DeployGate Inc.\""
|
95
|
+
@apple_distribution_certificate3 = " 2) yyyyyyyyyyyy \"Apple Distribution: DeployGate Inc2.\""
|
84
96
|
end
|
85
97
|
|
86
98
|
it "conflicting" do
|
87
99
|
allow(DeployGate::Xcode::Export).to receive(:installed_certificates).and_return([@distribution_certificate, @distribution_certificate2])
|
88
|
-
expect(DeployGate::Xcode::Export.
|
100
|
+
expect(DeployGate::Xcode::Export.installed_distribution_conflicting_certificates_by('iPhone Distribution').count).to eql 2
|
101
|
+
end
|
102
|
+
|
103
|
+
it "conflicting by apple" do
|
104
|
+
allow(DeployGate::Xcode::Export).to receive(:installed_certificates).and_return([@apple_distribution_certificate, @apple_distribution_certificate2])
|
105
|
+
expect(DeployGate::Xcode::Export.installed_distribution_conflicting_certificates_by('Apple Distribution').count).to eql 2
|
89
106
|
end
|
90
107
|
|
91
108
|
it "not conflicting" do
|
92
109
|
allow(DeployGate::Xcode::Export).to receive(:installed_certificates).and_return([@distribution_certificate, @distribution_certificate3])
|
93
|
-
expect(DeployGate::Xcode::Export.
|
110
|
+
expect(DeployGate::Xcode::Export.installed_distribution_conflicting_certificates_by('iPhone Distribution').count).to eql 0
|
111
|
+
end
|
112
|
+
|
113
|
+
it "not conflicting by apple" do
|
114
|
+
allow(DeployGate::Xcode::Export).to receive(:installed_certificates).and_return([@apple_distribution_certificate, @apple_distribution_certificate3])
|
115
|
+
expect(DeployGate::Xcode::Export.installed_distribution_conflicting_certificates_by('Apple Distribution').count).to eql 0
|
94
116
|
end
|
95
117
|
end
|
96
118
|
end
|
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.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- deploygate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -424,8 +424,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
424
424
|
- !ruby/object:Gem::Version
|
425
425
|
version: '0'
|
426
426
|
requirements: []
|
427
|
-
|
428
|
-
rubygems_version: 2.7.7
|
427
|
+
rubygems_version: 3.0.8
|
429
428
|
signing_key:
|
430
429
|
specification_version: 4
|
431
430
|
summary: A command-line interface for DeployGate
|