match 0.6.4 → 0.7.0

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
2
  SHA1:
3
- metadata.gz: 7f696c853c9f553b1b786a710873fdc900678300
4
- data.tar.gz: 06d77f068dbc65dad87bc08486cfefac376f2b98
3
+ metadata.gz: 902a98358d18b2e1bf344967d6e9f771c10f32e7
4
+ data.tar.gz: 7413ba0dbb0ddd9673a74b65839af48a6da25d6f
5
5
  SHA512:
6
- metadata.gz: 8c3e8e0a2885929c9b5c0d08f301a658917edb8a2b6dfcd2a72d20ca66fa5f64a03de2110bd9f9850025786f7c18a391e03144ea1971579f0d3fb5af498bb71b
7
- data.tar.gz: 4814e3048484ac38589435cdc31efd9fd241f70b655c910afc385eaa07f813c50de38ce2b6ec3fdead3a446190081b1af995d298cfac9bec2b20b1de1c8ea5ad
6
+ metadata.gz: fe112208237a92c54b328bc753124266406367d8874e7d13f7c899ed718939b499673f0c04211305958616221c1d8a2d6b9380567718618c032e07f121418d78
7
+ data.tar.gz: 9ca001e8a58a8dc9da12ec7b686377dffc16649134e9c992ef6e9b947ea68db2cbfe815010913e116b9ae53ebb104e0fe5d74032e4755d164a7fcc91c686e294
data/lib/match/runner.rb CHANGED
@@ -14,12 +14,12 @@ module Match
14
14
  spaceship.bundle_identifier_exists(params) if spaceship
15
15
 
16
16
  # Certificate
17
- cert_id = certificate(params: params)
17
+ cert_id = fetch_certificate(params: params)
18
18
  spaceship.certificate_exists(params, cert_id) if spaceship
19
19
 
20
20
  # Provisioning Profile
21
- uuid = profile(params: params,
22
- certificate_id: cert_id)
21
+ uuid = fetch_provisioning_profile(params: params,
22
+ certificate_id: cert_id)
23
23
  spaceship.profile_exists(params, uuid) if spaceship
24
24
 
25
25
  # Done
@@ -28,7 +28,7 @@ module Match
28
28
  GitHelper.commit_changes(params[:workspace], message, params[:git_url], params[:git_branch])
29
29
  end
30
30
 
31
- TablePrinter.print_summary(params, uuid)
31
+ TablePrinter.print_summary(params)
32
32
 
33
33
  UI.success "All required keys, certificates and provisioning profiles are installed 🙌".green
34
34
  rescue Spaceship::Client::UnexpectedResponse, Spaceship::Client::InvalidUserCredentialsError, Spaceship::Client::NoUserCredentialsError => ex
@@ -41,7 +41,7 @@ module Match
41
41
  GitHelper.clear_changes
42
42
  end
43
43
 
44
- def certificate(params: nil)
44
+ def fetch_certificate(params: nil)
45
45
  cert_type = :distribution
46
46
  cert_type = :development if params[:type] == "development"
47
47
  cert_type = :enterprise if Match.enterprise? && params[:type] == "enterprise"
@@ -72,10 +72,12 @@ module Match
72
72
  return File.basename(cert_path).gsub(".cer", "") # Certificate ID
73
73
  end
74
74
 
75
- def profile(params: nil, certificate_id: nil)
75
+ # @return [String] The UUID of the provisioning profile so we can verify it with the Apple Developer Portal
76
+ def fetch_provisioning_profile(params: nil, certificate_id: nil)
77
+ app_identifier = params[:app_identifier]
76
78
  prov_type = params[:type].to_sym
77
79
 
78
- profile_name = [Match::Generator.profile_type_name(prov_type), params[:app_identifier]].join("_").gsub("*", '\*') # this is important, as it shouldn't be a wildcard
80
+ profile_name = [Match::Generator.profile_type_name(prov_type), app_identifier].join("_").gsub("*", '\*') # this is important, as it shouldn't be a wildcard
79
81
  profiles = Dir[File.join(params[:workspace], "profiles", prov_type.to_s, "#{profile_name}.mobileprovision")]
80
82
 
81
83
  # Install the provisioning profiles
@@ -97,7 +99,19 @@ module Match
97
99
 
98
100
  parsed = FastlaneCore::ProvisioningProfile.parse(profile)
99
101
  uuid = parsed["UUID"]
100
- Utils.fill_environment(params, uuid)
102
+
103
+ Utils.fill_environment(Utils.environment_variable_name(app_identifier: app_identifier,
104
+ type: prov_type),
105
+ uuid)
106
+
107
+ # TeamIdentifier is returned as an array, but we're not sure why there could be more than one
108
+ Utils.fill_environment(Utils.environment_variable_name_team_id(app_identifier: app_identifier,
109
+ type: prov_type),
110
+ parsed["TeamIdentifier"].first)
111
+
112
+ Utils.fill_environment(Utils.environment_variable_name_profile_name(app_identifier: app_identifier,
113
+ type: prov_type),
114
+ parsed["Name"])
101
115
 
102
116
  return uuid
103
117
  end
@@ -1,16 +1,26 @@
1
1
  module Match
2
2
  class TablePrinter
3
- def self.print_summary(params, uuid)
3
+ def self.print_summary(params)
4
4
  rows = []
5
5
 
6
- rows << ["App Identifier", params[:app_identifier]]
7
- rows << ["Type", params[:type]]
8
- rows << ["UUID", uuid]
9
- rows << ["Environment Variable", Utils.environment_variable_name(params)]
6
+ app_identifier = params[:app_identifier]
7
+ type = params[:type].to_sym
8
+
9
+ rows << ["App Identifier", "", app_identifier]
10
+ rows << ["Type", "", type]
11
+
12
+ {
13
+ Utils.environment_variable_name(app_identifier: app_identifier, type: type) => "Profile UUID",
14
+ Utils.environment_variable_name_profile_name(app_identifier: app_identifier, type: type) => "Profile Name",
15
+ Utils.environment_variable_name_team_id(app_identifier: app_identifier, type: type) => "Development Team ID"
16
+ }.each do |env_key, name|
17
+ rows << [name, env_key, ENV[env_key]]
18
+ end
10
19
 
11
20
  params = {}
12
21
  params[:rows] = rows
13
22
  params[:title] = "Installed Provisioning Profile".green
23
+ params[:headings] = ['Parameter', 'Environment Variable', 'Value']
14
24
 
15
25
  puts ""
16
26
  puts Terminal::Table.new(params)
data/lib/match/utils.rb CHANGED
@@ -26,16 +26,26 @@ module Match
26
26
  Helper.backticks(command, print: $verbose)
27
27
  end
28
28
 
29
- # Fill in the UUID of the profiles in environment variables, much recycling
30
- def self.fill_environment(params, uuid)
31
- # instead we specify the UUID of the profiles
32
- key = environment_variable_name(params)
33
- UI.important "Setting environment variable '#{key}' to '#{uuid}'" if $verbose
34
- ENV[key] = uuid
29
+ # Fill in an environment variable, ready to be used in _xcodebuild_
30
+ def self.fill_environment(key, value)
31
+ UI.important "Setting environment variable '#{key}' to '#{value}'" if $verbose
32
+ ENV[key] = value
35
33
  end
36
34
 
37
- def self.environment_variable_name(params)
38
- ["sigh", params[:app_identifier], params[:type]].join("_")
35
+ def self.environment_variable_name(app_identifier: nil, type: nil)
36
+ base_environment_variable_name(app_identifier: app_identifier, type: type).join("_")
37
+ end
38
+
39
+ def self.environment_variable_name_team_id(app_identifier: nil, type: nil)
40
+ (base_environment_variable_name(app_identifier: app_identifier, type: type) + ["team-id"]).join("_")
41
+ end
42
+
43
+ def self.environment_variable_name_profile_name(app_identifier: nil, type: nil)
44
+ (base_environment_variable_name(app_identifier: app_identifier, type: type) + ["profile-name"]).join("_")
45
+ end
46
+
47
+ def self.base_environment_variable_name(app_identifier: nil, type: nil)
48
+ ["sigh", app_identifier, type]
39
49
  end
40
50
  end
41
51
  end
data/lib/match/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Match
2
- VERSION = "0.6.4"
2
+ VERSION = "0.7.0"
3
3
  DESCRIPTION = "Easily sync your certificates and profiles across your team using git"
4
4
  end
metadata CHANGED
@@ -1,267 +1,267 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: match
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-13 00:00:00.000000000 Z
11
+ date: 2016-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: security
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: fastlane_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.50.3
34
- - - <
33
+ version: 0.52.0
34
+ - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 1.0.0
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - '>='
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 0.50.3
44
- - - <
43
+ version: 0.52.0
44
+ - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 1.0.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: credentials_manager
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - '>='
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: 0.16.0
54
- - - <
54
+ - - "<"
55
55
  - !ruby/object:Gem::Version
56
56
  version: 1.0.0
57
57
  type: :runtime
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - '>='
61
+ - - ">="
62
62
  - !ruby/object:Gem::Version
63
63
  version: 0.16.0
64
- - - <
64
+ - - "<"
65
65
  - !ruby/object:Gem::Version
66
66
  version: 1.0.0
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: spaceship
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - '>='
71
+ - - ">="
72
72
  - !ruby/object:Gem::Version
73
- version: 0.31.10
74
- - - <
73
+ version: 0.32.1
74
+ - - "<"
75
75
  - !ruby/object:Gem::Version
76
76
  version: 1.0.0
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 0.31.10
84
- - - <
83
+ version: 0.32.1
84
+ - - "<"
85
85
  - !ruby/object:Gem::Version
86
86
  version: 1.0.0
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: sigh
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - '>='
91
+ - - ">="
92
92
  - !ruby/object:Gem::Version
93
93
  version: 1.10.2
94
- - - <
94
+ - - "<"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 2.0.0
97
97
  type: :runtime
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: 1.10.2
104
- - - <
104
+ - - "<"
105
105
  - !ruby/object:Gem::Version
106
106
  version: 2.0.0
107
107
  - !ruby/object:Gem::Dependency
108
108
  name: cert
109
109
  requirement: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - '>='
111
+ - - ">="
112
112
  - !ruby/object:Gem::Version
113
113
  version: 1.4.1
114
- - - <
114
+ - - "<"
115
115
  - !ruby/object:Gem::Version
116
116
  version: 2.0.0
117
117
  type: :runtime
118
118
  prerelease: false
119
119
  version_requirements: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - '>='
121
+ - - ">="
122
122
  - !ruby/object:Gem::Version
123
123
  version: 1.4.1
124
- - - <
124
+ - - "<"
125
125
  - !ruby/object:Gem::Version
126
126
  version: 2.0.0
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: bundler
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - '>='
131
+ - - ">="
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - '>='
138
+ - - ">="
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: rake
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - '>='
145
+ - - ">="
146
146
  - !ruby/object:Gem::Version
147
147
  version: '0'
148
148
  type: :development
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
- - - '>='
152
+ - - ">="
153
153
  - !ruby/object:Gem::Version
154
154
  version: '0'
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: rspec
157
157
  requirement: !ruby/object:Gem::Requirement
158
158
  requirements:
159
- - - ~>
159
+ - - "~>"
160
160
  - !ruby/object:Gem::Version
161
161
  version: 3.1.0
162
162
  type: :development
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
- - - ~>
166
+ - - "~>"
167
167
  - !ruby/object:Gem::Version
168
168
  version: 3.1.0
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: rspec_junit_formatter
171
171
  requirement: !ruby/object:Gem::Requirement
172
172
  requirements:
173
- - - ~>
173
+ - - "~>"
174
174
  - !ruby/object:Gem::Version
175
175
  version: 0.2.3
176
176
  type: :development
177
177
  prerelease: false
178
178
  version_requirements: !ruby/object:Gem::Requirement
179
179
  requirements:
180
- - - ~>
180
+ - - "~>"
181
181
  - !ruby/object:Gem::Version
182
182
  version: 0.2.3
183
183
  - !ruby/object:Gem::Dependency
184
184
  name: pry
185
185
  requirement: !ruby/object:Gem::Requirement
186
186
  requirements:
187
- - - '>='
187
+ - - ">="
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  type: :development
191
191
  prerelease: false
192
192
  version_requirements: !ruby/object:Gem::Requirement
193
193
  requirements:
194
- - - '>='
194
+ - - ">="
195
195
  - !ruby/object:Gem::Version
196
196
  version: '0'
197
197
  - !ruby/object:Gem::Dependency
198
198
  name: yard
199
199
  requirement: !ruby/object:Gem::Requirement
200
200
  requirements:
201
- - - ~>
201
+ - - "~>"
202
202
  - !ruby/object:Gem::Version
203
203
  version: 0.8.7.4
204
204
  type: :development
205
205
  prerelease: false
206
206
  version_requirements: !ruby/object:Gem::Requirement
207
207
  requirements:
208
- - - ~>
208
+ - - "~>"
209
209
  - !ruby/object:Gem::Version
210
210
  version: 0.8.7.4
211
211
  - !ruby/object:Gem::Dependency
212
212
  name: webmock
213
213
  requirement: !ruby/object:Gem::Requirement
214
214
  requirements:
215
- - - ~>
215
+ - - "~>"
216
216
  - !ruby/object:Gem::Version
217
217
  version: 1.19.0
218
218
  type: :development
219
219
  prerelease: false
220
220
  version_requirements: !ruby/object:Gem::Requirement
221
221
  requirements:
222
- - - ~>
222
+ - - "~>"
223
223
  - !ruby/object:Gem::Version
224
224
  version: 1.19.0
225
225
  - !ruby/object:Gem::Dependency
226
226
  name: coveralls
227
227
  requirement: !ruby/object:Gem::Requirement
228
228
  requirements:
229
- - - '>='
229
+ - - ">="
230
230
  - !ruby/object:Gem::Version
231
231
  version: '0'
232
232
  type: :development
233
233
  prerelease: false
234
234
  version_requirements: !ruby/object:Gem::Requirement
235
235
  requirements:
236
- - - '>='
236
+ - - ">="
237
237
  - !ruby/object:Gem::Version
238
238
  version: '0'
239
239
  - !ruby/object:Gem::Dependency
240
240
  name: fastlane
241
241
  requirement: !ruby/object:Gem::Requirement
242
242
  requirements:
243
- - - '>='
243
+ - - ">="
244
244
  - !ruby/object:Gem::Version
245
245
  version: '0'
246
246
  type: :development
247
247
  prerelease: false
248
248
  version_requirements: !ruby/object:Gem::Requirement
249
249
  requirements:
250
- - - '>='
250
+ - - ">="
251
251
  - !ruby/object:Gem::Version
252
252
  version: '0'
253
253
  - !ruby/object:Gem::Dependency
254
254
  name: rubocop
255
255
  requirement: !ruby/object:Gem::Requirement
256
256
  requirements:
257
- - - ~>
257
+ - - "~>"
258
258
  - !ruby/object:Gem::Version
259
259
  version: 0.38.0
260
260
  type: :development
261
261
  prerelease: false
262
262
  version_requirements: !ruby/object:Gem::Requirement
263
263
  requirements:
264
- - - ~>
264
+ - - "~>"
265
265
  - !ruby/object:Gem::Version
266
266
  version: 0.38.0
267
267
  description: Easily sync your certificates and profiles across your team using git
@@ -272,8 +272,12 @@ executables:
272
272
  extensions: []
273
273
  extra_rdoc_files: []
274
274
  files:
275
+ - LICENSE
276
+ - README.md
277
+ - bin/match
275
278
  - lib/assets/MatchfileTemplate
276
279
  - lib/assets/READMETemplate.md
280
+ - lib/match.rb
277
281
  - lib/match/change_password.rb
278
282
  - lib/match/commands_generator.rb
279
283
  - lib/match/encrypt.rb
@@ -287,10 +291,6 @@ files:
287
291
  - lib/match/table_printer.rb
288
292
  - lib/match/utils.rb
289
293
  - lib/match/version.rb
290
- - lib/match.rb
291
- - bin/match
292
- - README.md
293
- - LICENSE
294
294
  homepage: https://fastlane.tools
295
295
  licenses:
296
296
  - MIT
@@ -301,17 +301,17 @@ require_paths:
301
301
  - lib
302
302
  required_ruby_version: !ruby/object:Gem::Requirement
303
303
  requirements:
304
- - - '>='
304
+ - - ">="
305
305
  - !ruby/object:Gem::Version
306
306
  version: 2.0.0
307
307
  required_rubygems_version: !ruby/object:Gem::Requirement
308
308
  requirements:
309
- - - '>='
309
+ - - ">="
310
310
  - !ruby/object:Gem::Version
311
311
  version: '0'
312
312
  requirements: []
313
313
  rubyforge_project:
314
- rubygems_version: 2.0.14.1
314
+ rubygems_version: 2.6.6
315
315
  signing_key:
316
316
  specification_version: 4
317
317
  summary: Easily sync your certificates and profiles across your team using git