fastlane 2.145.0 → 2.146.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +84 -84
  3. data/credentials_manager/lib/credentials_manager/appfile_config.rb +4 -0
  4. data/deliver/lib/deliver/app_screenshot.rb +1 -0
  5. data/deliver/lib/deliver/options.rb +4 -1
  6. data/deliver/lib/deliver/setup.rb +4 -4
  7. data/{frameit/lib/frameit/.screenshot.rb.swp → fastlane/lib/fastlane/actions/.update_code_signing_settings.rb.swp} +0 -0
  8. data/fastlane/lib/fastlane/actions/create_pull_request.rb +7 -1
  9. data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +10 -4
  10. data/fastlane/lib/fastlane/actions/setup_jenkins.rb +11 -2
  11. data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +57 -49
  12. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +1 -1
  13. data/fastlane/lib/fastlane/helper/s3_client_helper.rb +13 -8
  14. data/fastlane/lib/fastlane/version.rb +1 -1
  15. data/fastlane/swift/Deliverfile.swift +1 -1
  16. data/fastlane/swift/Fastlane.swift +35 -2
  17. data/fastlane/swift/Gymfile.swift +1 -1
  18. data/fastlane/swift/Matchfile.swift +1 -1
  19. data/fastlane/swift/Precheckfile.swift +1 -1
  20. data/fastlane/swift/Scanfile.swift +1 -1
  21. data/fastlane/swift/Screengrabfile.swift +1 -1
  22. data/fastlane/swift/Snapshotfile.swift +1 -1
  23. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +9 -0
  24. data/fastlane_core/lib/fastlane_core/device_manager.rb +2 -2
  25. data/frameit/lib/frameit/editor.rb +1 -1
  26. data/frameit/lib/frameit/screenshot.rb +4 -0
  27. data/match/lib/match/importer.rb +2 -0
  28. data/match/lib/match/storage/s3_storage.rb +10 -5
  29. data/pilot/lib/pilot/build_manager.rb +15 -4
  30. data/pilot/lib/pilot/options.rb +8 -0
  31. data/produce/lib/produce/developer_center.rb +11 -2
  32. data/produce/lib/produce/itunes_connect.rb +11 -3
  33. data/produce/lib/produce/options.rb +12 -0
  34. data/screengrab/lib/screengrab/runner.rb +1 -1
  35. data/snapshot/lib/snapshot/reports_generator.rb +4 -0
  36. data/spaceship/lib/spaceship/portal/app_service.rb +2 -2
  37. data/spaceship/lib/spaceship/tunes/application.rb +2 -1
  38. data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
  39. data/supply/lib/supply/setup.rb +5 -3
  40. metadata +18 -20
  41. data/fastlane/lib/fastlane/actions/.push_to_git_remote.rb.swp +0 -0
  42. data/spaceship/lib/spaceship/portal/.portal_client.rb.swp +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50526fb8e2f431e1fe07d3667568902f85b83536f2a35a97763d85c40f3703b3
4
- data.tar.gz: f7b223f5674354e6034fc80cc8eeff9cf21c4d610254e3675e4fdab2fe9cbfc8
3
+ metadata.gz: bba444e95d8f103a74817cfcae961e4c7a608912577d81053e496586eefb8b44
4
+ data.tar.gz: 811a64d5eeaad53b01adcbc9ba47640e52d895c738a438945d6274a75461c0aa
5
5
  SHA512:
6
- metadata.gz: 45c216049c389336751e7927a578153cc80ed4c46d7bf77f3a59a8290e77fcf22f52cd1785d7f1effdee70b5f57aa8a1e8db2caba0c2a6fdb62a2cd20a013d2e
7
- data.tar.gz: dc3622f0cfb168ebb0ff473f769f600c85521e487330cd9ad085642bda846db8982db531d14746fe81462112510194495a793f7784c3a8800c4ff8f0c3cddec3
6
+ metadata.gz: 552371adbdda5455d913652ae431137aaa025b941084ccbf934f08740e5955f24e0d7d857e25495f738b697f8b4f1e17f5f8ac34e5e1e257426edd9fb3a683b8
7
+ data.tar.gz: bc83dfae6426fb0644afdaa547bed294adeb8092559da66eae5171b5ab96fdd53a90f4e955e5f1dd4b993dd2db3aef1ce69f00ab9d38db23c5017a01518be3d2
data/README.md CHANGED
@@ -34,23 +34,11 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
34
34
  <!-- This table is regenerated and resorted on each release -->
35
35
  <table id='team'>
36
36
  <tr>
37
- <td id='luka-mirosevic'>
38
- <a href='https://github.com/lmirosevic'>
39
- <img src='https://github.com/lmirosevic.png?size=140'>
40
- </a>
41
- <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
42
- </td>
43
- <td id='jan-piotrowski'>
44
- <a href='https://github.com/janpio'>
45
- <img src='https://github.com/janpio.png?size=140'>
46
- </a>
47
- <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
48
- </td>
49
- <td id='felix-krause'>
50
- <a href='https://github.com/KrauseFx'>
51
- <img src='https://github.com/KrauseFx.png?size=140'>
37
+ <td id='jorge-revuelta-h'>
38
+ <a href='https://github.com/minuscorp'>
39
+ <img src='https://github.com/minuscorp.png?size=140'>
52
40
  </a>
53
- <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
41
+ <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
54
42
  </td>
55
43
  <td id='max-ott'>
56
44
  <a href='https://github.com/max-ott'>
@@ -58,25 +46,17 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
58
46
  </a>
59
47
  <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
60
48
  </td>
61
- <td id='matthew-ellis'>
62
- <a href='https://github.com/matthewellis'>
63
- <img src='https://github.com/matthewellis.png?size=140'>
64
- </a>
65
- <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
66
- </td>
67
- </tr>
68
- <tr>
69
- <td id='fumiya-nakamura'>
70
- <a href='https://github.com/nafu'>
71
- <img src='https://github.com/nafu.png?size=140'>
49
+ <td id='aaron-brager'>
50
+ <a href='https://github.com/getaaron'>
51
+ <img src='https://github.com/getaaron.png?size=140'>
72
52
  </a>
73
- <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
53
+ <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
74
54
  </td>
75
- <td id='jimmy-dee'>
76
- <a href='https://github.com/jdee'>
77
- <img src='https://github.com/jdee.png?size=140'>
55
+ <td id='helmut-januschka'>
56
+ <a href='https://github.com/hjanuschka'>
57
+ <img src='https://github.com/hjanuschka.png?size=140'>
78
58
  </a>
79
- <h4 align='center'>Jimmy Dee</h4>
59
+ <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
80
60
  </td>
81
61
  <td id='stefan-natchev'>
82
62
  <a href='https://github.com/snatchev'>
@@ -84,17 +64,37 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
84
64
  </a>
85
65
  <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
86
66
  </td>
87
- <td id='olivier-halligon'>
88
- <a href='https://github.com/AliSoftware'>
89
- <img src='https://github.com/AliSoftware.png?size=140'>
67
+ </tr>
68
+ <tr>
69
+ <td id='luka-mirosevic'>
70
+ <a href='https://github.com/lmirosevic'>
71
+ <img src='https://github.com/lmirosevic.png?size=140'>
90
72
  </a>
91
- <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
73
+ <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
92
74
  </td>
93
- <td id='daniel-jankowski'>
94
- <a href='https://github.com/mollyIV'>
95
- <img src='https://github.com/mollyIV.png?size=140'>
75
+ <td id='andrew-mcburney'>
76
+ <a href='https://github.com/armcburney'>
77
+ <img src='https://github.com/armcburney.png?size=140'>
96
78
  </a>
97
- <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
79
+ <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
80
+ </td>
81
+ <td id='danielle-tomlinson'>
82
+ <a href='https://github.com/endocrimes'>
83
+ <img src='https://github.com/endocrimes.png?size=140'>
84
+ </a>
85
+ <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
86
+ </td>
87
+ <td id='jérôme-lacoste'>
88
+ <a href='https://github.com/lacostej'>
89
+ <img src='https://github.com/lacostej.png?size=140'>
90
+ </a>
91
+ <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
92
+ </td>
93
+ <td id='maksym-grebenets'>
94
+ <a href='https://github.com/mgrebenets'>
95
+ <img src='https://github.com/mgrebenets.png?size=140'>
96
+ </a>
97
+ <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
98
98
  </td>
99
99
  </tr>
100
100
  <tr>
@@ -104,75 +104,75 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
104
104
  </a>
105
105
  <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
106
106
  </td>
107
- <td id='kohki-miki'>
108
- <a href='https://github.com/giginet'>
109
- <img src='https://github.com/giginet.png?size=140'>
110
- </a>
111
- <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
112
- </td>
113
- <td id='helmut-januschka'>
114
- <a href='https://github.com/hjanuschka'>
115
- <img src='https://github.com/hjanuschka.png?size=140'>
107
+ <td id='jan-piotrowski'>
108
+ <a href='https://github.com/janpio'>
109
+ <img src='https://github.com/janpio.png?size=140'>
116
110
  </a>
117
- <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
111
+ <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
118
112
  </td>
119
- <td id='aaron-brager'>
120
- <a href='https://github.com/getaaron'>
121
- <img src='https://github.com/getaaron.png?size=140'>
113
+ <td id='olivier-halligon'>
114
+ <a href='https://github.com/AliSoftware'>
115
+ <img src='https://github.com/AliSoftware.png?size=140'>
122
116
  </a>
123
- <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
117
+ <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
124
118
  </td>
125
- <td id='jérôme-lacoste'>
126
- <a href='https://github.com/lacostej'>
127
- <img src='https://github.com/lacostej.png?size=140'>
119
+ <td id='felix-krause'>
120
+ <a href='https://github.com/KrauseFx'>
121
+ <img src='https://github.com/KrauseFx.png?size=140'>
128
122
  </a>
129
- <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
123
+ <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
130
124
  </td>
131
- </tr>
132
- <tr>
133
125
  <td id='josh-holtz'>
134
126
  <a href='https://github.com/joshdholtz'>
135
127
  <img src='https://github.com/joshdholtz.png?size=140'>
136
128
  </a>
137
129
  <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
138
130
  </td>
139
- <td id='manu-wallner'>
140
- <a href='https://github.com/milch'>
141
- <img src='https://github.com/milch.png?size=140'>
131
+ </tr>
132
+ <tr>
133
+ <td id='daniel-jankowski'>
134
+ <a href='https://github.com/mollyIV'>
135
+ <img src='https://github.com/mollyIV.png?size=140'>
142
136
  </a>
143
- <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
137
+ <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
144
138
  </td>
145
- <td id='jorge-revuelta-h'>
146
- <a href='https://github.com/minuscorp'>
147
- <img src='https://github.com/minuscorp.png?size=140'>
139
+ <td id='fumiya-nakamura'>
140
+ <a href='https://github.com/nafu'>
141
+ <img src='https://github.com/nafu.png?size=140'>
148
142
  </a>
149
- <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
143
+ <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
150
144
  </td>
151
- <td id='maksym-grebenets'>
152
- <a href='https://github.com/mgrebenets'>
153
- <img src='https://github.com/mgrebenets.png?size=140'>
145
+ <td id='iulian-onofrei'>
146
+ <a href='https://github.com/revolter'>
147
+ <img src='https://github.com/revolter.png?size=140'>
154
148
  </a>
155
- <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
149
+ <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
156
150
  </td>
157
- <td id='andrew-mcburney'>
158
- <a href='https://github.com/armcburney'>
159
- <img src='https://github.com/armcburney.png?size=140'>
151
+ <td id='matthew-ellis'>
152
+ <a href='https://github.com/matthewellis'>
153
+ <img src='https://github.com/matthewellis.png?size=140'>
160
154
  </a>
161
- <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
155
+ <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
156
+ </td>
157
+ <td id='manu-wallner'>
158
+ <a href='https://github.com/milch'>
159
+ <img src='https://github.com/milch.png?size=140'>
160
+ </a>
161
+ <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
162
162
  </td>
163
163
  </tr>
164
164
  <tr>
165
- <td id='danielle-tomlinson'>
166
- <a href='https://github.com/endocrimes'>
167
- <img src='https://github.com/endocrimes.png?size=140'>
165
+ <td id='jimmy-dee'>
166
+ <a href='https://github.com/jdee'>
167
+ <img src='https://github.com/jdee.png?size=140'>
168
168
  </a>
169
- <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
169
+ <h4 align='center'>Jimmy Dee</h4>
170
170
  </td>
171
- <td id='iulian-onofrei'>
172
- <a href='https://github.com/revolter'>
173
- <img src='https://github.com/revolter.png?size=140'>
171
+ <td id='kohki-miki'>
172
+ <a href='https://github.com/giginet'>
173
+ <img src='https://github.com/giginet.png?size=140'>
174
174
  </a>
175
- <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
175
+ <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
176
176
  </td>
177
177
  </table>
178
178
 
@@ -119,6 +119,10 @@ module CredentialsManager
119
119
  setter(:itc_team_name, *args, &block)
120
120
  end
121
121
 
122
+ def itc_provider(*args, &block)
123
+ setter(:itc_provider, *args, &block)
124
+ end
125
+
122
126
  # Android
123
127
  def json_key_file(*args, &block)
124
128
  setter(:json_key_file, *args, &block)
@@ -316,6 +316,7 @@ module Deliver
316
316
  def self.resolve_ipadpro_conflict_if_needed(screen_size, filename)
317
317
  is_3rd_gen = [
318
318
  "iPad Pro (12.9-inch) (3rd generation)", # default simulator name has this
319
+ "iPad Pro (12.9-inch) (4th generation)", # default simulator name has this
319
320
  "ipadPro129" # downloaded screenshots name has this
320
321
  ].any? { |key| filename.include?(key) }
321
322
  if is_3rd_gen
@@ -259,7 +259,10 @@ module Deliver
259
259
  FastlaneCore::ConfigItem.new(key: :itc_provider,
260
260
  env_name: "DELIVER_ITC_PROVIDER",
261
261
  description: "The provider short name to be used with the iTMSTransporter to identify your team. This value will override the automatically detected provider short name. To get provider short name run `pathToXcode.app/Contents/Applications/Application\\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column",
262
- optional: true),
262
+ optional: true,
263
+ code_gen_sensitive: true,
264
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_provider),
265
+ default_value_dynamic: true),
263
266
  # rubocop:enable Metrics/LineLength
264
267
 
265
268
  # precheck
@@ -67,7 +67,7 @@ module Deliver
67
67
  else
68
68
  content = app_details.send(key)[language].to_s
69
69
  end
70
- content << "\n"
70
+ content += "\n"
71
71
  resulting_path = File.join(path, language, "#{key}.txt")
72
72
  FileUtils.mkdir_p(File.expand_path('..', resulting_path))
73
73
  File.write(resulting_path, content)
@@ -82,7 +82,7 @@ module Deliver
82
82
  else
83
83
  content = app_details.send(key).to_s
84
84
  end
85
- content << "\n"
85
+ content += "\n"
86
86
  resulting_path = File.join(path, "#{key}.txt")
87
87
  File.write(resulting_path, content)
88
88
  UI.message("Writing to '#{resulting_path}'")
@@ -91,7 +91,7 @@ module Deliver
91
91
  # Trade Representative Contact Information
92
92
  UploadMetadata::TRADE_REPRESENTATIVE_CONTACT_INFORMATION_VALUES.each do |key, option_name|
93
93
  content = v.send(key).to_s
94
- content << "\n"
94
+ content += "\n"
95
95
  base_dir = File.join(path, UploadMetadata::TRADE_REPRESENTATIVE_CONTACT_INFORMATION_DIR)
96
96
  FileUtils.mkdir_p(base_dir)
97
97
  resulting_path = File.join(base_dir, "#{option_name}.txt")
@@ -102,7 +102,7 @@ module Deliver
102
102
  # Review information
103
103
  UploadMetadata::REVIEW_INFORMATION_VALUES.each do |key, option_name|
104
104
  content = v.send(key).to_s
105
- content << "\n"
105
+ content += "\n"
106
106
  base_dir = File.join(path, UploadMetadata::REVIEW_INFORMATION_DIR)
107
107
  FileUtils.mkdir_p(base_dir)
108
108
  resulting_path = File.join(base_dir, "#{option_name}.txt")
@@ -15,6 +15,7 @@ module Fastlane
15
15
  'base' => params[:base]
16
16
  }
17
17
  payload['body'] = params[:body] if params[:body]
18
+ payload['draft'] = params[:draft] if params[:draft]
18
19
 
19
20
  GithubApiAction.run(
20
21
  server_url: params[:api_url],
@@ -176,6 +177,11 @@ module Fastlane
176
177
  description: "The contents of the pull request",
177
178
  is_string: true,
178
179
  optional: true),
180
+ FastlaneCore::ConfigItem.new(key: :draft,
181
+ env_name: "GITHUB_PULL_REQUEST_DRAFT",
182
+ description: "Indicates whether the pull request is a draft",
183
+ type: Boolean,
184
+ optional: true),
179
185
  FastlaneCore::ConfigItem.new(key: :labels,
180
186
  env_name: "GITHUB_PULL_REQUEST_LABELS",
181
187
  description: "The labels for the pull request",
@@ -226,7 +232,7 @@ module Fastlane
226
232
  end
227
233
 
228
234
  def self.author
229
- ["seei", "tommeier", "marumemomo", "elneruda"]
235
+ ["seei", "tommeier", "marumemomo", "elneruda", "kagemiku"]
230
236
  end
231
237
 
232
238
  def self.is_supported?(platform)
@@ -190,10 +190,16 @@ The `Snapfile` can contain all the options that are also available on `fastlane
190
190
  scheme("UITests")
191
191
 
192
192
  devices([
193
- "iPhone 6",
194
- "iPhone 6 Plus",
195
- "iPhone 5",
196
- "iPhone 4s"
193
+ "iPad (7th generation)",
194
+ "iPad Air (3rd generation)",
195
+ "iPad Pro (11-inch)",
196
+ "iPad Pro (12.9-inch) (3rd generation)",
197
+ "iPad Pro (9.7-inch)",
198
+ "iPhone 11",
199
+ "iPhone 11 Pro",
200
+ "iPhone 11 Pro Max",
201
+ "iPhone 8",
202
+ "iPhone 8 Plus"
197
203
  ])
198
204
 
199
205
  languages([
@@ -14,7 +14,10 @@ module Fastlane
14
14
  "SCAN_DERIVED_DATA_PATH",
15
15
  "SCAN_OUTPUT_DIRECTORY",
16
16
  "SCAN_RESULT_BUNDLE",
17
- "XCODE_DERIVED_DATA_PATH"
17
+ "XCODE_DERIVED_DATA_PATH",
18
+ "MATCH_KEYCHAIN_NAME",
19
+ "MATCH_KEYCHAIN_PASSWORD",
20
+ "MATCH_READONLY"
18
21
  ].freeze
19
22
 
20
23
  def self.run(params)
@@ -40,6 +43,9 @@ module Fastlane
40
43
  add_to_search_list: params[:add_keychain_to_search_list],
41
44
  set_default: params[:set_default_keychain]
42
45
  )
46
+ ENV['MATCH_KEYCHAIN_NAME'] ||= keychain_path
47
+ ENV['MATCH_KEYCHAIN_PASSWORD'] ||= params[:keychain_password]
48
+ ENV["MATCH_READONLY"] ||= true.to_s
43
49
  end
44
50
 
45
51
  # Code signing identity
@@ -90,6 +96,7 @@ module Fastlane
90
96
  def self.details
91
97
  list = <<-LIST.markdown_list(true)
92
98
  Adds and unlocks keychains from Jenkins 'Keychains and Provisioning Profiles Plugin'
99
+ Sets unlocked keychain to be used by Match
93
100
  Sets code signing identity from Jenkins 'Keychains and Provisioning Profiles Plugin'
94
101
  Sets output directory to './output' (gym, scan and backup_xcarchive)
95
102
  Sets derived data path to './derivedData' (xcodebuild, gym, scan and clear_derived_data, carthage)
@@ -99,7 +106,9 @@ module Fastlane
99
106
  [
100
107
  list,
101
108
  "This action helps with Jenkins integration. Creates own derived data for each job. All build results like IPA files and archives will be stored in the `./output` directory.",
102
- "The action also works with [Keychains and Provisioning Profiles Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Keychains+and+Provisioning+Profiles+Plugin), the selected keychain will be automatically unlocked and the selected code signing identity will be used. By default this action will only work when _fastlane_ is executed on a CI system."
109
+ "The action also works with [Keychains and Provisioning Profiles Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Keychains+and+Provisioning+Profiles+Plugin), the selected keychain will be automatically unlocked and the selected code signing identity will be used.",
110
+ "[Match](https://docs.fastlane.tools/actions/match/) will be also set up to use the unlocked keychain and set in read-only mode, if its environment variables were not yet defined.",
111
+ "By default this action will only work when _fastlane_ is executed on a CI system."
103
112
  ].join("\n")
104
113
  end
105
114
 
@@ -16,72 +16,62 @@ module Fastlane
16
16
  return false
17
17
  end
18
18
 
19
- target_dictionary = project.targets.map { |f| { name: f.name, uuid: f.uuid, build_configuration_list: f.build_configuration_list } }
20
- target_attributes = project.root_object.attributes["TargetAttributes"]
21
19
  changed_targets = []
20
+ changed_build_configurations = []
22
21
 
23
- # make sure TargetAttributes exist for all targets
24
- target_dictionary.each do |props|
25
- unless target_attributes.key?(props[:uuid])
26
- target_attributes[props[:uuid]] = {}
27
- end
28
- end
29
-
30
- target_attributes.each do |target, sett|
31
- found_target = target_dictionary.detect { |h| h[:uuid] == target }
22
+ project.targets.each do |target|
32
23
  if params[:targets]
33
- # get target name
34
- unless params[:targets].include?(found_target[:name])
35
- UI.important("Skipping #{found_target[:name]} not selected (#{params[:targets].join(',')})")
24
+ unless params[:targets].include?(target.name)
25
+ UI.important("Skipping #{target.name} not selected (#{params[:targets].join(',')})")
36
26
  next
37
27
  end
38
28
  end
39
29
 
40
- style_value = params[:use_automatic_signing] ? 'Automatic' : 'Manual'
41
- build_configuration_list = found_target[:build_configuration_list]
42
- build_configuration_list.set_setting("CODE_SIGN_STYLE", style_value)
43
- sett["ProvisioningStyle"] = style_value
44
-
45
- if params[:team_id]
46
- sett["DevelopmentTeam"] = params[:team_id]
47
- build_configuration_list.set_setting("DEVELOPMENT_TEAM", params[:team_id])
48
- UI.important("Set Team id to: #{params[:team_id]} for target: #{found_target[:name]}")
49
- end
50
- if params[:code_sign_identity]
51
- build_configuration_list.set_setting("CODE_SIGN_IDENTITY", params[:code_sign_identity])
52
-
53
- # We also need to update the value if it was overridden for a specific SDK
54
- build_configuration_list.build_configurations.each do |build_configuration|
55
- codesign_build_settings_keys = build_configuration.build_settings.keys.select { |key| key.to_s.match(/CODE_SIGN_IDENTITY.*/) }
56
- codesign_build_settings_keys.each do |setting|
57
- build_configuration_list.set_setting(setting, params[:code_sign_identity])
30
+ target.build_configurations.each do |config|
31
+ if params[:build_configurations]
32
+ unless params[:build_configurations].include?(config.name)
33
+ UI.important("Skipping #{config.name} not selected (#{params[:build_configurations].join(',')})")
34
+ next
58
35
  end
59
36
  end
60
- UI.important("Set Code Sign identity to: #{params[:code_sign_identity]} for target: #{found_target[:name]}")
61
- end
62
- if params[:profile_name]
63
- build_configuration_list.set_setting("PROVISIONING_PROFILE_SPECIFIER", params[:profile_name])
64
- UI.important("Set Provisioning Profile name to: #{params[:profile_name]} for target: #{found_target[:name]}")
65
- end
66
- # Since Xcode 8, this is no longer needed, you simply use PROVISIONING_PROFILE_SPECIFIER
67
- if params[:profile_uuid]
68
- build_configuration_list.set_setting("PROVISIONING_PROFILE", params[:profile_uuid])
69
- UI.important("Set Provisioning Profile UUID to: #{params[:profile_uuid]} for target: #{found_target[:name]}")
70
- end
71
- if params[:bundle_identifier]
72
- build_configuration_list.set_setting("PRODUCT_BUNDLE_IDENTIFIER", params[:bundle_identifier])
73
- UI.important("Set Bundle identifier to: #{params[:bundle_identifier]} for target: #{found_target[:name]}")
37
+
38
+ style_value = params[:use_automatic_signing] ? 'Automatic' : 'Manual'
39
+ set_build_setting(config, "CODE_SIGN_STYLE", style_value)
40
+
41
+ if params[:team_id]
42
+ set_build_setting(config, "DEVELOPMENT_TEAM", params[:team_id])
43
+ UI.important("Set Team id to: #{params[:team_id]} for target: #{target.name} for build configuration: #{config.name}")
44
+ end
45
+ if params[:code_sign_identity]
46
+ set_build_setting(config, "CODE_SIGN_IDENTITY", params[:code_sign_identity])
47
+ UI.important("Set Code Sign identity to: #{params[:code_sign_identity]} for target: #{target.name} for build configuration: #{config.name}")
48
+ end
49
+ if params[:profile_name]
50
+ set_build_setting(config, "PROVISIONING_PROFILE_SPECIFIER", params[:profile_name])
51
+ UI.important("Set Provisioning Profile name to: #{params[:profile_name]} for target: #{target.name} for build configuration: #{config.name}")
52
+ end
53
+ # Since Xcode 8, this is no longer needed, you simply use PROVISIONING_PROFILE_SPECIFIER
54
+ if params[:profile_uuid]
55
+ set_build_setting(config, "PROVISIONING_PROFILE", params[:profile_uuid])
56
+ UI.important("Set Provisioning Profile UUID to: #{params[:profile_uuid]} for target: #{target.name} for build configuration: #{config.name}")
57
+ end
58
+ if params[:bundle_identifier]
59
+ set_build_setting(config, "PRODUCT_BUNDLE_IDENTIFIER", params[:bundle_identifier])
60
+ UI.important("Set Bundle identifier to: #{params[:bundle_identifier]} for target: #{target.name} for build configuration: #{config.name}")
61
+ end
62
+
63
+ changed_build_configurations << config.name
74
64
  end
75
65
 
76
- changed_targets << found_target[:name]
66
+ changed_targets << target.name
77
67
  end
78
68
  project.save
79
69
 
80
70
  if changed_targets.empty?
81
71
  UI.important("None of the specified targets has been modified")
82
72
  UI.important("available targets:")
83
- target_dictionary.each do |target|
84
- UI.important("\t* #{target[:name]}")
73
+ project.targets.each do |target|
74
+ UI.important("\t* #{target.name}")
85
75
  end
86
76
  else
87
77
  UI.success("Successfully updated project settings to use Code Sign Style = '#{params[:use_automatic_signing] ? 'Automatic' : 'Manual'}'")
@@ -89,11 +79,23 @@ module Fastlane
89
79
  changed_targets.each do |target|
90
80
  UI.success("\t * #{target}")
91
81
  end
82
+
83
+ UI.success("Modified Build Configurations:")
84
+ changed_build_configurations.each do |name|
85
+ UI.success("\t * #{name}")
86
+ end
92
87
  end
93
88
 
94
89
  params[:use_automatic_signing]
95
90
  end
96
91
 
92
+ def self.set_build_setting(configuration, name, value)
93
+ codesign_build_settings_keys = configuration.build_settings.keys.select { |key| key.to_s.match(/#{name}.*/) }
94
+ codesign_build_settings_keys.each do |key|
95
+ configuration.build_settings[key] = value
96
+ end
97
+ end
98
+
97
99
  def self.description
98
100
  "Configures Xcode's Codesigning options"
99
101
  end
@@ -129,6 +131,12 @@ module Fastlane
129
131
  type: Array,
130
132
  description: "Specify targets you want to toggle the signing mech. (default to all targets)",
131
133
  is_string: false),
134
+ FastlaneCore::ConfigItem.new(key: :build_configurations,
135
+ env_name: "FL_PROJECT_SIGNING_BUILD_CONFIGURATIONS",
136
+ optional: true,
137
+ type: Array,
138
+ description: "Specify build_configurations you want to toggle the signing mech. (default to all targets)",
139
+ is_string: false),
132
140
  FastlaneCore::ConfigItem.new(key: :code_sign_identity,
133
141
  env_name: "FL_CODE_SIGN_IDENTITY",
134
142
  description: "Code signing identity type (iPhone Developer, iPhone Distribution)",