fastlane 2.201.1 → 2.204.0

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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +92 -92
  3. data/deliver/lib/deliver/runner.rb +19 -2
  4. data/deliver/lib/deliver/submit_for_review.rb +25 -3
  5. data/fastlane/lib/fastlane/actions/run_tests.rb +10 -2
  6. data/fastlane/lib/fastlane/actions/trainer.rb +2 -2
  7. data/fastlane/lib/fastlane/actions/verify_build.rb +1 -1
  8. data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +1 -1
  9. data/fastlane/lib/fastlane/swift_lane_manager.rb +11 -3
  10. data/fastlane/lib/fastlane/swift_runner_upgrader.rb +55 -1
  11. data/fastlane/lib/fastlane/version.rb +1 -1
  12. data/fastlane/swift/Atomic.swift +150 -0
  13. data/fastlane/swift/Deliverfile.swift +1 -1
  14. data/fastlane/swift/DeliverfileProtocol.swift +2 -2
  15. data/fastlane/swift/Fastlane.swift +197 -161
  16. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +30 -20
  17. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +1 -1
  18. data/fastlane/swift/Gymfile.swift +1 -1
  19. data/fastlane/swift/GymfileProtocol.swift +2 -2
  20. data/fastlane/swift/LaneFileProtocol.swift +1 -1
  21. data/fastlane/swift/Matchfile.swift +1 -1
  22. data/fastlane/swift/MatchfileProtocol.swift +6 -2
  23. data/fastlane/swift/Precheckfile.swift +1 -1
  24. data/fastlane/swift/PrecheckfileProtocol.swift +2 -2
  25. data/fastlane/swift/Runner.swift +9 -1
  26. data/fastlane/swift/Scanfile.swift +1 -1
  27. data/fastlane/swift/ScanfileProtocol.swift +7 -3
  28. data/fastlane/swift/Screengrabfile.swift +1 -1
  29. data/fastlane/swift/ScreengrabfileProtocol.swift +2 -2
  30. data/fastlane/swift/Snapshotfile.swift +1 -1
  31. data/fastlane/swift/SnapshotfileProtocol.swift +2 -2
  32. data/fastlane/swift/SocketClient.swift +5 -1
  33. data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
  34. data/fastlane/swift/formatting/Brewfile.lock.json +19 -19
  35. data/fastlane/swift/upgrade_manifest.json +1 -1
  36. data/fastlane_core/lib/fastlane_core/device_manager.rb +5 -1
  37. data/match/lib/match/nuke.rb +33 -9
  38. data/match/lib/match/options.rb +5 -0
  39. data/match/lib/match/storage/s3_storage.rb +3 -3
  40. data/pilot/lib/pilot/build_manager.rb +17 -7
  41. data/pilot/lib/pilot/options.rb +6 -1
  42. data/scan/lib/scan/options.rb +6 -1
  43. data/scan/lib/scan/runner.rb +40 -13
  44. data/scan/lib/scan/test_command_generator.rb +8 -3
  45. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +5 -1
  46. data/spaceship/lib/spaceship/connect_api/models/app.rb +2 -1
  47. metadata +24 -27
  48. data/fastlane/lib/fastlane/actions/.run_tests.rb.swp +0 -0
  49. data/scan/lib/scan/.error_handler.rb.swp +0 -0
  50. data/scan/lib/scan/.runner.rb.swp +0 -0
  51. data/trainer/lib/trainer/.options.rb.swp +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de45de805167ed42b9b9ca8e458af9c292ea15254677ef2096f3d4d22be71f27
4
- data.tar.gz: 4b8aeaaa8347aa87e6d467d1c25d0f97672e25689c1f3d2a90775e1a638c8fc3
3
+ metadata.gz: 1c60db14f0042e080f4e2d72b69cff3f15d87a386496dc500854e04f22cba9af
4
+ data.tar.gz: ffa77b289f662bbf7bee76e6d50f070ce3f80e7bdcae09b442a5055d298a3f01
5
5
  SHA512:
6
- metadata.gz: ba614e31deb05b17521edc2cc755738b876f80cb4b0d49411f76d524665c358241d79d1401b1e58f5de93778235a73e8f982f6a250912f3fde358c9e51b5b59a
7
- data.tar.gz: 997d036a081987c2df2134057f4c1ac94fe81ac6a06af00994d326797207eb7b4bcabe3c3605c9092c91e473e745d9c2e5516811b9172b3c596f874d3292c41e
6
+ metadata.gz: 5e381f72be29e92998c78b611c64bee3238845fe9c37648dab6f63064aee8f052d4f0dd9186057ff8d293bfb477ec3cf11baef8b90d3ac229a848b1eef6f681f
7
+ data.tar.gz: 611a72c173c79ada3db1a1eef30dc0316b9afafd2361179a00a7e3ced7700e3bfb263db499779f4db7d41fe4e50ce88c37221d07a2004c6d1c72fd08cb5bbab8
data/README.md CHANGED
@@ -35,17 +35,11 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
35
35
  <!-- This table is regenerated and resorted on each release -->
36
36
  <table id='team'>
37
37
  <tr>
38
- <td id='jorge-revuelta-h'>
39
- <a href='https://github.com/minuscorp'>
40
- <img src='https://github.com/minuscorp.png' width='140px;'>
41
- </a>
42
- <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
43
- </td>
44
- <td id='luka-mirosevic'>
45
- <a href='https://github.com/lmirosevic'>
46
- <img src='https://github.com/lmirosevic.png' width='140px;'>
38
+ <td id='felix-krause'>
39
+ <a href='https://github.com/KrauseFx'>
40
+ <img src='https://github.com/KrauseFx.png' width='140px;'>
47
41
  </a>
48
- <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
42
+ <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
49
43
  </td>
50
44
  <td id='jimmy-dee'>
51
45
  <a href='https://github.com/jdee'>
@@ -53,11 +47,11 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
53
47
  </a>
54
48
  <h4 align='center'>Jimmy Dee</h4>
55
49
  </td>
56
- <td id='iulian-onofrei'>
57
- <a href='https://github.com/revolter'>
58
- <img src='https://github.com/revolter.png' width='140px;'>
50
+ <td id='satoshi-namai'>
51
+ <a href='https://github.com/ainame'>
52
+ <img src='https://github.com/ainame.png' width='140px;'>
59
53
  </a>
60
- <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
54
+ <h4 align='center'><a href='https://twitter.com/ainame'>Satoshi Namai</a></h4>
61
55
  </td>
62
56
  <td id='olivier-halligon'>
63
57
  <a href='https://github.com/AliSoftware'>
@@ -65,83 +59,69 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
65
59
  </a>
66
60
  <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
67
61
  </td>
62
+ <td id='iulian-onofrei'>
63
+ <a href='https://github.com/revolter'>
64
+ <img src='https://github.com/revolter.png' width='140px;'>
65
+ </a>
66
+ <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
67
+ </td>
68
68
  </tr>
69
69
  <tr>
70
- <td id='łukasz-grabowski'>
71
- <a href='https://github.com/lucgrabowski'>
72
- <img src='https://github.com/lucgrabowski.png' width='140px;'>
70
+ <td id='stefan-natchev'>
71
+ <a href='https://github.com/snatchev'>
72
+ <img src='https://github.com/snatchev.png' width='140px;'>
73
73
  </a>
74
- <h4 align='center'>Łukasz Grabowski</h4>
74
+ <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
75
75
  </td>
76
- <td id='josh-holtz'>
77
- <a href='https://github.com/joshdholtz'>
78
- <img src='https://github.com/joshdholtz.png' width='140px;'>
76
+ <td id='jorge-revuelta-h'>
77
+ <a href='https://github.com/minuscorp'>
78
+ <img src='https://github.com/minuscorp.png' width='140px;'>
79
79
  </a>
80
- <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
80
+ <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
81
81
  </td>
82
- <td id='felix-krause'>
83
- <a href='https://github.com/KrauseFx'>
84
- <img src='https://github.com/KrauseFx.png' width='140px;'>
82
+ <td id='aaron-brager'>
83
+ <a href='https://github.com/getaaron'>
84
+ <img src='https://github.com/getaaron.png' width='140px;'>
85
85
  </a>
86
- <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
86
+ <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
87
87
  </td>
88
- <td id='joshua-liebowitz'>
89
- <a href='https://github.com/taquitos'>
90
- <img src='https://github.com/taquitos.png' width='140px;'>
88
+ <td id='łukasz-grabowski'>
89
+ <a href='https://github.com/lucgrabowski'>
90
+ <img src='https://github.com/lucgrabowski.png' width='140px;'>
91
91
  </a>
92
- <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
92
+ <h4 align='center'>Łukasz Grabowski</h4>
93
93
  </td>
94
- <td id='danielle-tomlinson'>
95
- <a href='https://github.com/endocrimes'>
96
- <img src='https://github.com/endocrimes.png' width='140px;'>
94
+ <td id='maksym-grebenets'>
95
+ <a href='https://github.com/mgrebenets'>
96
+ <img src='https://github.com/mgrebenets.png' width='140px;'>
97
97
  </a>
98
- <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
98
+ <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
99
99
  </td>
100
100
  </tr>
101
101
  <tr>
102
- <td id='manu-wallner'>
103
- <a href='https://github.com/milch'>
104
- <img src='https://github.com/milch.png' width='140px;'>
105
- </a>
106
- <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
107
- </td>
108
- <td id='kohki-miki'>
109
- <a href='https://github.com/giginet'>
110
- <img src='https://github.com/giginet.png' width='140px;'>
111
- </a>
112
- <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
113
- </td>
114
102
  <td id='daniel-jankowski'>
115
103
  <a href='https://github.com/mollyIV'>
116
104
  <img src='https://github.com/mollyIV.png' width='140px;'>
117
105
  </a>
118
106
  <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
119
107
  </td>
120
- <td id='roger-oba'>
121
- <a href='https://github.com/rogerluan'>
122
- <img src='https://github.com/rogerluan.png' width='140px;'>
123
- </a>
124
- <h4 align='center'><a href='https://twitter.com/rogerluan_'>Roger Oba</a></h4>
125
- </td>
126
- <td id='satoshi-namai'>
127
- <a href='https://github.com/ainame'>
128
- <img src='https://github.com/ainame.png' width='140px;'>
108
+ <td id='max-ott'>
109
+ <a href='https://github.com/max-ott'>
110
+ <img src='https://github.com/max-ott.png' width='140px;'>
129
111
  </a>
130
- <h4 align='center'><a href='https://twitter.com/ainame'>Satoshi Namai</a></h4>
112
+ <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
131
113
  </td>
132
- </tr>
133
- <tr>
134
- <td id='manish-rathi'>
135
- <a href='https://github.com/crazymanish'>
136
- <img src='https://github.com/crazymanish.png' width='140px;'>
114
+ <td id='matthew-ellis'>
115
+ <a href='https://github.com/matthewellis'>
116
+ <img src='https://github.com/matthewellis.png' width='140px;'>
137
117
  </a>
138
- <h4 align='center'><a href='https://twitter.com/iammanishrathi'>Manish Rathi</a></h4>
118
+ <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
139
119
  </td>
140
- <td id='aaron-brager'>
141
- <a href='https://github.com/getaaron'>
142
- <img src='https://github.com/getaaron.png' width='140px;'>
120
+ <td id='josh-holtz'>
121
+ <a href='https://github.com/joshdholtz'>
122
+ <img src='https://github.com/joshdholtz.png' width='140px;'>
143
123
  </a>
144
- <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
124
+ <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
145
125
  </td>
146
126
  <td id='jérôme-lacoste'>
147
127
  <a href='https://github.com/lacostej'>
@@ -149,11 +129,13 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
149
129
  </a>
150
130
  <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
151
131
  </td>
152
- <td id='stefan-natchev'>
153
- <a href='https://github.com/snatchev'>
154
- <img src='https://github.com/snatchev.png' width='140px;'>
132
+ </tr>
133
+ <tr>
134
+ <td id='andrew-mcburney'>
135
+ <a href='https://github.com/armcburney'>
136
+ <img src='https://github.com/armcburney.png' width='140px;'>
155
137
  </a>
156
- <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
138
+ <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
157
139
  </td>
158
140
  <td id='jan-piotrowski'>
159
141
  <a href='https://github.com/janpio'>
@@ -161,19 +143,17 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
161
143
  </a>
162
144
  <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
163
145
  </td>
164
- </tr>
165
- <tr>
166
- <td id='matthew-ellis'>
167
- <a href='https://github.com/matthewellis'>
168
- <img src='https://github.com/matthewellis.png' width='140px;'>
146
+ <td id='helmut-januschka'>
147
+ <a href='https://github.com/hjanuschka'>
148
+ <img src='https://github.com/hjanuschka.png' width='140px;'>
169
149
  </a>
170
- <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
150
+ <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
171
151
  </td>
172
- <td id='andrew-mcburney'>
173
- <a href='https://github.com/armcburney'>
174
- <img src='https://github.com/armcburney.png' width='140px;'>
152
+ <td id='danielle-tomlinson'>
153
+ <a href='https://github.com/endocrimes'>
154
+ <img src='https://github.com/endocrimes.png' width='140px;'>
175
155
  </a>
176
- <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
156
+ <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
177
157
  </td>
178
158
  <td id='fumiya-nakamura'>
179
159
  <a href='https://github.com/nafu'>
@@ -181,25 +161,45 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
181
161
  </a>
182
162
  <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
183
163
  </td>
184
- <td id='helmut-januschka'>
185
- <a href='https://github.com/hjanuschka'>
186
- <img src='https://github.com/hjanuschka.png' width='140px;'>
164
+ </tr>
165
+ <tr>
166
+ <td id='manu-wallner'>
167
+ <a href='https://github.com/milch'>
168
+ <img src='https://github.com/milch.png' width='140px;'>
187
169
  </a>
188
- <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
170
+ <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
189
171
  </td>
190
- <td id='max-ott'>
191
- <a href='https://github.com/max-ott'>
192
- <img src='https://github.com/max-ott.png' width='140px;'>
172
+ <td id='manish-rathi'>
173
+ <a href='https://github.com/crazymanish'>
174
+ <img src='https://github.com/crazymanish.png' width='140px;'>
193
175
  </a>
194
- <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
176
+ <h4 align='center'><a href='https://twitter.com/iammanishrathi'>Manish Rathi</a></h4>
177
+ </td>
178
+ <td id='roger-oba'>
179
+ <a href='https://github.com/rogerluan'>
180
+ <img src='https://github.com/rogerluan.png' width='140px;'>
181
+ </a>
182
+ <h4 align='center'><a href='https://twitter.com/rogerluan_'>Roger Oba</a></h4>
183
+ </td>
184
+ <td id='kohki-miki'>
185
+ <a href='https://github.com/giginet'>
186
+ <img src='https://github.com/giginet.png' width='140px;'>
187
+ </a>
188
+ <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
189
+ </td>
190
+ <td id='luka-mirosevic'>
191
+ <a href='https://github.com/lmirosevic'>
192
+ <img src='https://github.com/lmirosevic.png' width='140px;'>
193
+ </a>
194
+ <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
195
195
  </td>
196
196
  </tr>
197
197
  <tr>
198
- <td id='maksym-grebenets'>
199
- <a href='https://github.com/mgrebenets'>
200
- <img src='https://github.com/mgrebenets.png' width='140px;'>
198
+ <td id='joshua-liebowitz'>
199
+ <a href='https://github.com/taquitos'>
200
+ <img src='https://github.com/taquitos.png' width='140px;'>
201
201
  </a>
202
- <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
202
+ <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
203
203
  </td>
204
204
  </table>
205
205
 
@@ -197,8 +197,25 @@ module Deliver
197
197
  def reject_version_if_possible
198
198
  app = Deliver.cache[:app]
199
199
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
200
- if app.reject_version_if_possible!(platform: platform)
201
- UI.success("Successfully rejected previous version!")
200
+
201
+ submission = app.get_in_progress_review_submission(platform: platform)
202
+ if submission
203
+ submission.cancel_submission
204
+ UI.message("Review submission cancellation has been requested")
205
+
206
+ # An app version won't get removed from review instantly
207
+ # Polling until app version has a state of DEVELOPER_REJECT
208
+ loop do
209
+ version = app.get_edit_app_store_version(platform: platform)
210
+ if version.app_store_state == Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::DEVELOPER_REJECTED
211
+ break
212
+ end
213
+
214
+ UI.message("Waiting for cancellation to take effect...")
215
+ sleep(15)
216
+ end
217
+
218
+ UI.success("Successfully cancelled previous submission!")
202
219
  end
203
220
  end
204
221
 
@@ -23,12 +23,34 @@ module Deliver
23
23
  update_idfa(options, app, version)
24
24
  update_submission_information(options, app)
25
25
 
26
- version.create_app_store_version_submission
27
-
26
+ create_review_submission(options, app, version, platform)
28
27
  UI.success("Successfully submitted the app for review!")
29
28
  end
30
29
 
31
- private def select_build(options, app, version, platform)
30
+ private
31
+
32
+ def create_review_submission(options, app, version, platform)
33
+ # Can't submit a review if there is already a review in progress
34
+ if app.get_in_progress_review_submission(platform: platform)
35
+ UI.user_error!("Cannot submit for review - A review submission is already in progress")
36
+ end
37
+
38
+ # There can only be one open submission per platform per app
39
+ # There might be a submission already created so we need to check
40
+ # 1. Create the submission if its not already created
41
+ # 2. Error if submission already contains some items for review (because we don't know what they are)
42
+ submission = app.get_ready_review_submission(platform: platform, includes: "items")
43
+ if submission.nil?
44
+ submission = app.create_review_submission(platform: platform)
45
+ elsif !submission.items.empty?
46
+ UI.user_error!("Cannot submit for review - A review submission already exists with items not managed by fastlane. Please cancel or remove items from submission for the App Store Connect website")
47
+ end
48
+
49
+ submission.add_app_store_version_to_review_items(app_store_version_id: version.id)
50
+ submission.submit_for_review
51
+ end
52
+
53
+ def select_build(options, app, version, platform)
32
54
  if options[:build_number] && options[:build_number] != "latest"
33
55
  UI.message("Selecting existing build-number: #{options[:build_number]}")
34
56
 
@@ -14,12 +14,12 @@ module Fastlane
14
14
  manager = Scan::Manager.new
15
15
 
16
16
  begin
17
- manager.work(values)
17
+ results = manager.work(values)
18
18
 
19
19
  zip_build_products_path = Scan.cache[:zip_build_products_path]
20
20
  Actions.lane_context[SharedValues::SCAN_ZIP_BUILD_PRODUCTS_PATH] = zip_build_products_path if zip_build_products_path
21
21
 
22
- return true
22
+ return results
23
23
  rescue FastlaneCore::Interface::FastlaneBuildFailure => ex
24
24
  # Specifically catching FastlaneBuildFailure to prevent build/compile errors from being
25
25
  # silenced when :fail_build is set to false
@@ -56,6 +56,14 @@ module Fastlane
56
56
  "More information: https://docs.fastlane.tools/actions/scan/"
57
57
  end
58
58
 
59
+ def self.return_value
60
+ 'Outputs has of results with :number_of_tests, :number_of_failures, :number_of_retries, :number_of_tests_excluding_retries, :number_of_failures_excluding_retries'
61
+ end
62
+
63
+ def self.return_type
64
+ :hash
65
+ end
66
+
59
67
  def self.author
60
68
  "KrauseFx"
61
69
  end
@@ -9,8 +9,8 @@ module Fastlane
9
9
 
10
10
  fail_build = params[:fail_build]
11
11
  resulting_paths = Trainer::TestParser.auto_convert(params)
12
- resulting_paths.each do |path, test_successful|
13
- UI.test_failure!("Unit tests failed") if fail_build && !test_successful
12
+ resulting_paths.each do |path, test_results|
13
+ UI.test_failure!("Unit tests failed") if fail_build && !test_results[:successful]
14
14
  end
15
15
 
16
16
  return resulting_paths
@@ -101,7 +101,7 @@ module Fastlane
101
101
  UI.user_error!("Mismatched team_identifier. Required: '#{params[:team_identifier]}'; Found: '#{values['team_identifier']}'") unless params[:team_identifier] == values['team_identifier']
102
102
  end
103
103
  if params[:team_name]
104
- UI.user_error!("Mismatched team_name. Required: '#{params[:team_name]}'; Found: 'values['team_name']'") unless params[:team_name] == values['team_name']
104
+ UI.user_error!("Mismatched team_name. Required: '#{params[:team_name]}'; Found: '#{values['team_name']}'") unless params[:team_name] == values['team_name']
105
105
  end
106
106
  if params[:app_name]
107
107
  UI.user_error!("Mismatched app_name. Required: '#{params[:app_name]}'; Found: '#{values['app_name']}'") unless params[:app_name] == values['app_name']
@@ -367,7 +367,7 @@ func parseInt(fromString: String, function: String = #function) -> Int {
367
367
  protocol_content_array = []
368
368
  protocol_name = tool_swift_function.protocol_name
369
369
 
370
- protocol_content_array << "public protocol #{protocol_name}: class {"
370
+ protocol_content_array << "public protocol #{protocol_name}: AnyObject {"
371
371
  protocol_content_array += tool_swift_function.swift_vars
372
372
  protocol_content_array << "}"
373
373
  protocol_content_array << ""
@@ -33,7 +33,7 @@ module Fastlane
33
33
  # wait on socket_thread to be in ready state, then start the runner thread
34
34
  self.cruise_swift_lane_in_thread(lane, parameters, swift_server_port)
35
35
 
36
- socket_thread.join
36
+ socket_thread.value
37
37
  rescue Exception => ex # rubocop:disable Lint/RescueException
38
38
  e = ex
39
39
  end
@@ -74,7 +74,10 @@ module Fastlane
74
74
 
75
75
  def self.display_lanes
76
76
  self.ensure_runner_built!
77
- Actions.sh(%(#{FastlaneCore::FastlaneFolder.swift_runner_path} lanes))
77
+ return_value = Actions.sh(%(#{FastlaneCore::FastlaneFolder.swift_runner_path} lanes))
78
+ if FastlaneCore::Globals.verbose?
79
+ UI.message("runner output: ".yellow + return_value)
80
+ end
78
81
  end
79
82
 
80
83
  def self.cruise_swift_lane_in_thread(lane, parameters = nil, swift_server_port)
@@ -94,7 +97,12 @@ module Fastlane
94
97
  parameter_string += " swiftServerPort #{swift_server_port}"
95
98
 
96
99
  return Thread.new do
97
- Actions.sh(%(#{FastlaneCore::FastlaneFolder.swift_runner_path} lane #{lane}#{parameter_string} > /dev/null))
100
+ if FastlaneCore::Globals.verbose?
101
+ return_value = Actions.sh(%(#{FastlaneCore::FastlaneFolder.swift_runner_path} lane #{lane}#{parameter_string}))
102
+ UI.message("runner output: ".yellow + return_value)
103
+ else
104
+ Actions.sh(%(#{FastlaneCore::FastlaneFolder.swift_runner_path} lane #{lane}#{parameter_string} > /dev/null))
105
+ end
98
106
  end
99
107
  end
100
108
 
@@ -45,7 +45,9 @@ module Fastlane
45
45
  end
46
46
 
47
47
  def upgrade_if_needed!(dry_run: false)
48
- upgraded = add_missing_groups_and_files!(dry_run: dry_run)
48
+ upgraded = add_missing_flags!(dry_run: dry_run)
49
+ upgraded = add_missing_copy_phase!(dry_run: dry_run) || upgraded
50
+ upgraded = add_missing_groups_and_files!(dry_run: dry_run) || upgraded
49
51
  upgraded = upgrade_files!(dry_run: dry_run) || upgraded
50
52
  upgraded = add_new_files_to_groups! || upgraded
51
53
 
@@ -208,5 +210,57 @@ module Fastlane
208
210
 
209
211
  return true # yup, we definitely updated groups
210
212
  end
213
+
214
+ # adds build_settings flags to fastlane_runner_target
215
+ def add_missing_flags!(dry_run: false)
216
+ # Check if upgrade is needed
217
+ # If fastlane build settings exists already, we don't need any more changes to the Xcode project
218
+ self.fastlane_runner_target.build_configurations.each { |config|
219
+ return false if dry_run && config.build_settings["CODE_SIGN_IDENTITY"].nil?
220
+ return false if dry_run && config.build_settings["MACOSX_DEPLOYMENT_TARGET"].nil?
221
+ }
222
+ return true if dry_run
223
+
224
+ # Proceed to upgrade
225
+ self.fastlane_runner_target.build_configurations.each { |config|
226
+ config.build_settings["CODE_SIGN_IDENTITY"] = "-"
227
+ config.build_settings["MACOSX_DEPLOYMENT_TARGET"] = "10.12"
228
+ }
229
+ target_project.save
230
+ end
231
+
232
+ # adds new copy files build phase to fastlane_runner_target
233
+ def add_missing_copy_phase!(dry_run: false)
234
+ # Check if upgrade is needed
235
+ # If fastlane copy files build phase exists already, we don't need any more changes to the Xcode project
236
+ phase_copy_sign = self.fastlane_runner_target.copy_files_build_phases.select { |phase_copy| phase_copy.name == "FastlaneRunnerCopySigned" }.first
237
+
238
+ old_phase_copy_sign = self.fastlane_runner_target.shell_script_build_phases.select { |phase_copy| phase_copy.shell_script == "cd \"${SRCROOT}\"\ncd ../..\ncp \"${TARGET_BUILD_DIR}/${EXECUTABLE_PATH}\" .\n" }.first
239
+ unless phase_copy_sign
240
+ return false if dry_run
241
+ end
242
+
243
+ return true if dry_run
244
+
245
+ # Proceed to upgrade
246
+ old_phase_copy_sign.remove_from_project unless old_phase_copy_sign.nil?
247
+
248
+ unless phase_copy_sign
249
+ # Create a copy files build phase
250
+ phase_copy_sign = self.fastlane_runner_target.new_copy_files_build_phase("FastlaneRunnerCopySigned")
251
+ phase_copy_sign.dst_path = "$SRCROOT/../.."
252
+ phase_copy_sign.dst_subfolder_spec = "0"
253
+ phase_copy_sign.run_only_for_deployment_postprocessing = "0"
254
+ targetBinaryReference = self.fastlane_runner_target.product_reference
255
+ phase_copy_sign.add_file_reference(targetBinaryReference)
256
+
257
+ # Set "Code sign on copy" flag on Xcode for fastlane_runner_target
258
+ targetBinaryReference.build_files.each { |target_binary_build_file_reference|
259
+ target_binary_build_file_reference.settings = { "ATTRIBUTES": ["CodeSignOnCopy"] }
260
+ }
261
+ end
262
+
263
+ target_project.save
264
+ end
211
265
  end
212
266
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.201.1'.freeze
2
+ VERSION = '2.204.0'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  RUBOCOP_REQUIREMENT = '1.12.1'.freeze