fastlane 2.150.0.rc5 → 2.150.2

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/{fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp → deliver/lib/deliver/.commands_generator.rb.swp} +0 -0
  4. data/{pilot/lib/pilot/.manager.rb.swp → deliver/lib/deliver/.download_screenshots.rb.swp} +0 -0
  5. data/deliver/lib/deliver/.submit_for_review.rb.swp +0 -0
  6. data/deliver/lib/deliver/.upload_metadata.rb.swp +0 -0
  7. data/deliver/lib/deliver/.upload_screenshots.rb.swp +0 -0
  8. data/deliver/lib/deliver/download_screenshots.rb +11 -9
  9. data/deliver/lib/deliver/runner.rb +11 -4
  10. data/deliver/lib/deliver/upload_metadata.rb +37 -14
  11. data/deliver/lib/deliver/upload_screenshots.rb +19 -6
  12. data/fastlane/lib/fastlane/actions/slather.rb +7 -0
  13. data/fastlane/lib/fastlane/version.rb +1 -1
  14. data/fastlane/swift/Deliverfile.swift +1 -1
  15. data/fastlane/swift/DeliverfileProtocol.swift +6 -6
  16. data/fastlane/swift/Fastlane.swift +21 -15
  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/swift/SocketClient.swift +2 -1
  24. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +0 -1
  25. data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +1 -1
  26. data/{fastlane/lib/fastlane/actions/.hockey.rb.swp → frameit/lib/frameit/.editor.rb.swp} +0 -0
  27. data/spaceship/lib/spaceship/{connect_api/.DS_Store → .DS_Store} +0 -0
  28. data/spaceship/lib/spaceship/connect_api.rb +2 -1
  29. data/{fastlane/lib/fastlane/actions/.slack.rb.swp → spaceship/lib/spaceship/connect_api/.file_uploader.rb.swp} +0 -0
  30. data/spaceship/lib/spaceship/connect_api/models/.app_screenshot.rb.swp +0 -0
  31. data/spaceship/lib/spaceship/connect_api/models/app.rb +22 -2
  32. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +29 -2
  33. data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +3 -2
  34. data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +31 -2
  35. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +30 -2
  36. data/spaceship/lib/spaceship/connect_api/models/{app_review_attachment.rb → app_store_review_attachment.rb} +6 -6
  37. data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +7 -8
  38. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +21 -3
  39. data/spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb +64 -0
  40. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +74 -14
  41. metadata +41 -37
  42. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5713ac3ee6b1f2b1d00c5575f825292626471ea0adb1d82f20963a497b565e3c
4
- data.tar.gz: dbc6d60bac4cc2fbfc3e806d981ccaf4de1342b8357ff7edca3eeae981d54cc4
3
+ metadata.gz: 87ea2530852ddd4a16e80f9935752a54ce909b00d0c13960f5c1d57b41e40891
4
+ data.tar.gz: 126a9a64389074d2f34fde46baf7687574e91f9090f1d318f4583552d642e847
5
5
  SHA512:
6
- metadata.gz: 68c6a15af4df30d5a53e2a161f084f39188bbd293445f921fcc1f47ed4e6d6c35ea9acea25d6ad5ab73156155cfa514a0b239009b73385ce949603e3cacf8dc9
7
- data.tar.gz: 6b791c19da977f7db0eb906e4dddccd4fbee7f75b098d3eff67f1bad6a249ff6a267c4082c842fd0a2cd1474d98b836d6b7a4c6278c64388f4f858f2b3b09941
6
+ metadata.gz: f8b50d9557dbd71db173be7d854bc511f161f00e7a6115571b99dee6029806b3280d6386c19b0814a7175bd486f3fa46e0d9786a316102a0816c55e4315a5da5
7
+ data.tar.gz: 6c86f8a577d56a9a859a94765f51704ab80b2003facfb9b4baf355f693012d3a9b5f02def5b25fefa41750bb6bc8a1813d8a9faf73b19f541b1c4af626249fbf
data/README.md CHANGED
@@ -34,43 +34,43 @@ 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='iulian-onofrei'>
38
- <a href='https://github.com/revolter'>
39
- <img src='https://github.com/revolter.png?size=140'>
37
+ <td id='max-ott'>
38
+ <a href='https://github.com/max-ott'>
39
+ <img src='https://github.com/max-ott.png?size=140'>
40
40
  </a>
41
- <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
41
+ <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
42
42
  </td>
43
- <td id='stefan-natchev'>
44
- <a href='https://github.com/snatchev'>
45
- <img src='https://github.com/snatchev.png?size=140'>
43
+ <td id='jan-piotrowski'>
44
+ <a href='https://github.com/janpio'>
45
+ <img src='https://github.com/janpio.png?size=140'>
46
46
  </a>
47
- <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
47
+ <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
48
48
  </td>
49
- <td id='joshua-liebowitz'>
50
- <a href='https://github.com/taquitos'>
51
- <img src='https://github.com/taquitos.png?size=140'>
49
+ <td id='jérôme-lacoste'>
50
+ <a href='https://github.com/lacostej'>
51
+ <img src='https://github.com/lacostej.png?size=140'>
52
52
  </a>
53
- <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
53
+ <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
54
54
  </td>
55
- <td id='helmut-januschka'>
56
- <a href='https://github.com/hjanuschka'>
57
- <img src='https://github.com/hjanuschka.png?size=140'>
55
+ <td id='stefan-natchev'>
56
+ <a href='https://github.com/snatchev'>
57
+ <img src='https://github.com/snatchev.png?size=140'>
58
58
  </a>
59
- <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
59
+ <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
60
60
  </td>
61
- <td id='jorge-revuelta-h'>
62
- <a href='https://github.com/minuscorp'>
63
- <img src='https://github.com/minuscorp.png?size=140'>
61
+ <td id='andrew-mcburney'>
62
+ <a href='https://github.com/armcburney'>
63
+ <img src='https://github.com/armcburney.png?size=140'>
64
64
  </a>
65
- <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
65
+ <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
66
66
  </td>
67
67
  </tr>
68
68
  <tr>
69
- <td id='luka-mirosevic'>
70
- <a href='https://github.com/lmirosevic'>
71
- <img src='https://github.com/lmirosevic.png?size=140'>
69
+ <td id='manu-wallner'>
70
+ <a href='https://github.com/milch'>
71
+ <img src='https://github.com/milch.png?size=140'>
72
72
  </a>
73
- <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
73
+ <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
74
74
  </td>
75
75
  <td id='danielle-tomlinson'>
76
76
  <a href='https://github.com/endocrimes'>
@@ -78,75 +78,37 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
78
78
  </a>
79
79
  <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
80
80
  </td>
81
- <td id='jan-piotrowski'>
82
- <a href='https://github.com/janpio'>
83
- <img src='https://github.com/janpio.png?size=140'>
84
- </a>
85
- <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
86
- </td>
87
- <td id='aaron-brager'>
88
- <a href='https://github.com/getaaron'>
89
- <img src='https://github.com/getaaron.png?size=140'>
90
- </a>
91
- <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
92
- </td>
93
- <td id='olivier-halligon'>
94
- <a href='https://github.com/AliSoftware'>
95
- <img src='https://github.com/AliSoftware.png?size=140'>
81
+ <td id='fumiya-nakamura'>
82
+ <a href='https://github.com/nafu'>
83
+ <img src='https://github.com/nafu.png?size=140'>
96
84
  </a>
97
- <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
85
+ <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
98
86
  </td>
99
- </tr>
100
- <tr>
101
87
  <td id='jimmy-dee'>
102
88
  <a href='https://github.com/jdee'>
103
89
  <img src='https://github.com/jdee.png?size=140'>
104
90
  </a>
105
91
  <h4 align='center'>Jimmy Dee</h4>
106
92
  </td>
107
- <td id='daniel-jankowski'>
108
- <a href='https://github.com/mollyIV'>
109
- <img src='https://github.com/mollyIV.png?size=140'>
110
- </a>
111
- <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
112
- </td>
113
- <td id='felix-krause'>
114
- <a href='https://github.com/KrauseFx'>
115
- <img src='https://github.com/KrauseFx.png?size=140'>
116
- </a>
117
- <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
118
- </td>
119
- <td id='matthew-ellis'>
120
- <a href='https://github.com/matthewellis'>
121
- <img src='https://github.com/matthewellis.png?size=140'>
122
- </a>
123
- <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
124
- </td>
125
- <td id='manu-wallner'>
126
- <a href='https://github.com/milch'>
127
- <img src='https://github.com/milch.png?size=140'>
93
+ <td id='joshua-liebowitz'>
94
+ <a href='https://github.com/taquitos'>
95
+ <img src='https://github.com/taquitos.png?size=140'>
128
96
  </a>
129
- <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
97
+ <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
130
98
  </td>
131
99
  </tr>
132
100
  <tr>
133
- <td id='andrew-mcburney'>
134
- <a href='https://github.com/armcburney'>
135
- <img src='https://github.com/armcburney.png?size=140'>
136
- </a>
137
- <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
138
- </td>
139
- <td id='jérôme-lacoste'>
140
- <a href='https://github.com/lacostej'>
141
- <img src='https://github.com/lacostej.png?size=140'>
101
+ <td id='aaron-brager'>
102
+ <a href='https://github.com/getaaron'>
103
+ <img src='https://github.com/getaaron.png?size=140'>
142
104
  </a>
143
- <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
105
+ <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
144
106
  </td>
145
- <td id='max-ott'>
146
- <a href='https://github.com/max-ott'>
147
- <img src='https://github.com/max-ott.png?size=140'>
107
+ <td id='helmut-januschka'>
108
+ <a href='https://github.com/hjanuschka'>
109
+ <img src='https://github.com/hjanuschka.png?size=140'>
148
110
  </a>
149
- <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
111
+ <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
150
112
  </td>
151
113
  <td id='josh-holtz'>
152
114
  <a href='https://github.com/joshdholtz'>
@@ -154,26 +116,64 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
154
116
  </a>
155
117
  <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
156
118
  </td>
157
- <td id='fumiya-nakamura'>
158
- <a href='https://github.com/nafu'>
159
- <img src='https://github.com/nafu.png?size=140'>
119
+ <td id='jorge-revuelta-h'>
120
+ <a href='https://github.com/minuscorp'>
121
+ <img src='https://github.com/minuscorp.png?size=140'>
160
122
  </a>
161
- <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
123
+ <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
162
124
  </td>
163
- </tr>
164
- <tr>
165
125
  <td id='maksym-grebenets'>
166
126
  <a href='https://github.com/mgrebenets'>
167
127
  <img src='https://github.com/mgrebenets.png?size=140'>
168
128
  </a>
169
129
  <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
170
130
  </td>
131
+ </tr>
132
+ <tr>
133
+ <td id='olivier-halligon'>
134
+ <a href='https://github.com/AliSoftware'>
135
+ <img src='https://github.com/AliSoftware.png?size=140'>
136
+ </a>
137
+ <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
138
+ </td>
139
+ <td id='matthew-ellis'>
140
+ <a href='https://github.com/matthewellis'>
141
+ <img src='https://github.com/matthewellis.png?size=140'>
142
+ </a>
143
+ <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
144
+ </td>
145
+ <td id='daniel-jankowski'>
146
+ <a href='https://github.com/mollyIV'>
147
+ <img src='https://github.com/mollyIV.png?size=140'>
148
+ </a>
149
+ <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
150
+ </td>
171
151
  <td id='kohki-miki'>
172
152
  <a href='https://github.com/giginet'>
173
153
  <img src='https://github.com/giginet.png?size=140'>
174
154
  </a>
175
155
  <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
176
156
  </td>
157
+ <td id='felix-krause'>
158
+ <a href='https://github.com/KrauseFx'>
159
+ <img src='https://github.com/KrauseFx.png?size=140'>
160
+ </a>
161
+ <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
162
+ </td>
163
+ </tr>
164
+ <tr>
165
+ <td id='luka-mirosevic'>
166
+ <a href='https://github.com/lmirosevic'>
167
+ <img src='https://github.com/lmirosevic.png?size=140'>
168
+ </a>
169
+ <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
170
+ </td>
171
+ <td id='iulian-onofrei'>
172
+ <a href='https://github.com/revolter'>
173
+ <img src='https://github.com/revolter.png?size=140'>
174
+ </a>
175
+ <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
176
+ </td>
177
177
  </table>
178
178
 
179
179
  Special thanks to all [contributors](https://github.com/fastlane/fastlane/graphs/contributors) for extending and improving _fastlane_.
@@ -19,24 +19,26 @@ module Deliver
19
19
  app = Spaceship::ConnectAPI::App.get(app_id: app_id)
20
20
 
21
21
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
22
- version = if options[:use_live_version]
23
- app.get_live_app_store_version(platform: platform)
24
- else
25
- app.get_edit_app_store_version(platform: platform)
26
- end
22
+ if options[:use_live_version]
23
+ version = app.get_live_app_store_version(platform: platform)
24
+ UI.user_error!("Could not find a live version on App Store Connect. Try using '--use_live_version false'") if version.nil?
25
+ else
26
+ version = app.get_edit_app_store_version(platform: platform)
27
+ UI.user_error!("Could not find an edit version on App Store Connect. Try using '--use_live_version true'") if version.nil?
28
+ end
27
29
 
28
30
  localizations = version.get_app_store_version_localizations
29
31
  localizations.each do |localization|
30
32
  screenshot_sets = localization.get_app_screenshot_sets
31
33
  screenshot_sets.each do |screenshot_set|
32
34
  screenshot_set.app_screenshots.each_with_index do |screenshot, index|
33
- url = screenshot.image_asset_url
34
- next if url.nil?
35
-
36
35
  file_name = [index, screenshot_set.screenshot_display_type, index].join("_")
37
- original_file_extension = File.basename(screenshot.file_name)
36
+ original_file_extension = File.extname(screenshot.file_name).strip.downcase[1..-1]
38
37
  file_name += "." + original_file_extension
39
38
 
39
+ url = screenshot.image_asset_url(type: original_file_extension)
40
+ next if url.nil?
41
+
40
42
  language = localization.locale
41
43
 
42
44
  UI.message("Downloading existing screenshot '#{file_name}' for language '#{language}'")
@@ -34,6 +34,11 @@ module Deliver
34
34
 
35
35
  def run
36
36
  verify_version if options[:app_version].to_s.length > 0 && !options[:skip_app_version_update]
37
+
38
+ # Rejecting before upload meta
39
+ # Screenshots can not be update/deleted if in waiting for review
40
+ reject_version_if_possible if options[:reject_if_possible]
41
+
37
42
  upload_metadata
38
43
 
39
44
  has_binary = (options[:ipa] || options[:pkg])
@@ -43,8 +48,6 @@ module Deliver
43
48
 
44
49
  UI.success("Finished the upload to App Store Connect") unless options[:skip_binary_upload]
45
50
 
46
- reject_version_if_possible if options[:reject_if_possible]
47
-
48
51
  precheck_success = precheck_app
49
52
  submit_for_review if options[:submit_for_review] && precheck_success
50
53
  end
@@ -159,8 +162,12 @@ module Deliver
159
162
  end
160
163
 
161
164
  def reject_version_if_possible
162
- app = options[:app]
163
- if app.reject_version_if_possible!
165
+ legacy_app = options[:app]
166
+ app_id = legacy_app.apple_id
167
+ app = Spaceship::ConnectAPI::App.get(app_id: app_id)
168
+
169
+ platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
170
+ if app.reject_version_if_possible!(platform: platform)
164
171
  UI.success("Successfully rejected previous version!")
165
172
  end
166
173
  end
@@ -80,8 +80,10 @@ module Deliver
80
80
 
81
81
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
82
82
 
83
- app_store_version_localizations = verify_available_version_languages!(options, app) unless options[:edit_live]
84
- app_info_localizations = verify_available_info_languages!(options, app) unless options[:edit_live]
83
+ enabled_languages = detect_languages(options)
84
+
85
+ app_store_version_localizations = verify_available_version_languages!(options, app, enabled_languages) unless options[:edit_live]
86
+ app_info_localizations = verify_available_info_languages!(options, app, enabled_languages) unless options[:edit_live]
85
87
 
86
88
  if options[:edit_live]
87
89
  # not all values are editable when using live_version
@@ -106,7 +108,9 @@ module Deliver
106
108
  end
107
109
 
108
110
  # Needed for to filter out release notes from being sent up
109
- is_first_version = app.get_live_app_store_version(platform: platform).nil?
111
+ number_of_versions = app.get_app_store_versions(filter: { platform: platform }, limit: 2).size
112
+ is_first_version = number_of_versions == 1
113
+ UI.verbose("Version '#{version.version_string}' is the first version on App Store Connect") if is_first_version
110
114
 
111
115
  UI.important("Will begin uploading metadata for '#{version.version_string}' on App Store Connect")
112
116
 
@@ -158,7 +162,11 @@ module Deliver
158
162
  end
159
163
 
160
164
  release_type = if options[:auto_release_date]
161
- non_localized_version_attributes['earliestReleaseDate'] = options[:auto_release_date]
165
+ # Convert time format to 2020-06-17T12:00:00-07:00
166
+ time_in_ms = options[:auto_release_date]
167
+ date = convert_ms_to_iso8601(time_in_ms)
168
+
169
+ non_localized_version_attributes['earliestReleaseDate'] = date
162
170
  Spaceship::ConnectAPI::AppStoreVersion::ReleaseType::SCHEDULED
163
171
  elsif options[:automatic_release]
164
172
  Spaceship::ConnectAPI::AppStoreVersion::ReleaseType::AFTER_APPROVAL
@@ -315,6 +323,20 @@ module Deliver
315
323
 
316
324
  # rubocop:enable Metrics/PerceivedComplexity
317
325
 
326
+ def convert_ms_to_iso8601(time_in_ms)
327
+ time_in_s = time_in_ms / 1000
328
+
329
+ # Remove minutes and seconds (whole hour)
330
+ seconds_in_hour = 60 * 60
331
+ time_in_s_to_hour = (time_in_s / seconds_in_hour).to_i * seconds_in_hour
332
+
333
+ # Remove minute offset if timezone has minute offset
334
+ minute_offset = Time.now.utc_offset % seconds_in_hour
335
+ time_in_s_to_hour -= minute_offset
336
+
337
+ return Time.at(time_in_s_to_hour).utc.strftime("%Y-%m-%dT%H:%M:%S%:z")
338
+ end
339
+
318
340
  # If the user is using the 'default' language, then assign values where they are needed
319
341
  def assign_defaults(options)
320
342
  # Normalizes languages keys from symbols to strings
@@ -389,7 +411,7 @@ module Deliver
389
411
  end
390
412
 
391
413
  # Finding languages to enable
392
- def verify_available_info_languages!(options, app)
414
+ def verify_available_info_languages!(options, app, languages)
393
415
  app_info = app.fetch_edit_app_info
394
416
 
395
417
  unless app_info
@@ -399,7 +421,7 @@ module Deliver
399
421
 
400
422
  localizations = app_info.get_app_info_localizations
401
423
 
402
- languages = (options[:languages] || []).reject { |lang| lang == "default" }
424
+ languages = (languages || []).reject { |lang| lang == "default" }
403
425
  locales_to_enable = languages - localizations.map(&:locale)
404
426
 
405
427
  if locales_to_enable.count > 0
@@ -423,7 +445,7 @@ module Deliver
423
445
  end
424
446
 
425
447
  # Finding languages to enable
426
- def verify_available_version_languages!(options, app)
448
+ def verify_available_version_languages!(options, app, languages)
427
449
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
428
450
  version = app.get_edit_app_store_version(platform: platform)
429
451
 
@@ -434,7 +456,7 @@ module Deliver
434
456
 
435
457
  localizations = version.get_app_store_version_localizations
436
458
 
437
- languages = (options[:languages] || []).reject { |lang| lang == "default" }
459
+ languages = (languages || []).reject { |lang| lang == "default" }
438
460
  locales_to_enable = languages - localizations.map(&:locale)
439
461
 
440
462
  if locales_to_enable.count > 0
@@ -532,7 +554,8 @@ module Deliver
532
554
  UI.message("Uploading app review information to App Store Connect")
533
555
  app_store_review_detail = begin
534
556
  version.fetch_app_store_review_detail
535
- rescue
557
+ rescue => error
558
+ UI.error("Error fetching app store review detail - #{error.message}")
536
559
  nil
537
560
  end # errors if doesn't exist
538
561
  if app_store_review_detail
@@ -544,19 +567,19 @@ module Deliver
544
567
 
545
568
  def set_review_attachment_file(version, options)
546
569
  app_store_review_detail = version.fetch_app_store_review_detail
547
- app_review_attachments = app_store_review_detail.fetch_app_review_attachments
570
+ app_store_review_attachments = app_store_review_detail.app_store_review_attachments || []
548
571
 
549
572
  if options[:app_review_attachment_file]
550
- app_review_attachments.each do |app_review_attachment|
573
+ app_store_review_attachments.each do |app_store_review_attachment|
551
574
  UI.message("Removing previous review attachment file from App Store Connect")
552
- app_review_attachment.delete!
575
+ app_store_review_attachment.delete!
553
576
  end
554
577
 
555
578
  UI.message("Uploading review attachment file to App Store Connect")
556
579
  app_store_review_detail.upload_attachment(path: options[:app_review_attachment_file])
557
580
  else
558
- app_review_attachments.each(&:delete!)
559
- UI.message("Removing review attachment file to App Store Connect") unless app_review_attachments.empty?
581
+ app_store_review_attachments.each(&:delete!)
582
+ UI.message("Removing review attachment file to App Store Connect") unless app_store_review_attachments.empty?
560
583
  end
561
584
  end
562
585
 
@@ -65,8 +65,8 @@ module Deliver
65
65
  end
66
66
 
67
67
  # Crash if any errors happen while deleting
68
- unless errors.empty?
69
- UI.crash!(errors.map(&:message).join("\n"))
68
+ errors.each do |error|
69
+ UI.error(error.message)
70
70
  end
71
71
  end
72
72
  end
@@ -92,14 +92,27 @@ module Deliver
92
92
  localizations = version.get_app_store_version_localizations
93
93
  end
94
94
 
95
- upload_screenshots(screenshots_per_language, localizations)
95
+ upload_screenshots(screenshots_per_language, localizations, options)
96
96
  end
97
97
 
98
- def upload_screenshots(screenshots_per_language, localizations)
98
+ def upload_screenshots(screenshots_per_language, localizations, options)
99
99
  # Check if should wait for processing
100
- wait_for_processing = !FastlaneCore::Env.truthy?("DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING")
100
+ # Default to waiting if submitting for review (since needed for submission)
101
+ # Otherwise use enviroment variable
102
+ if ENV["DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING"].nil?
103
+ wait_for_processing = options[:submit_for_review]
104
+ UI.verbose("Setting wait_for_processing from ':submit_for_review' option")
105
+ else
106
+ UI.verbose("Setting wait_for_processing from 'DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING' environment variable")
107
+ wait_for_processing = !FastlaneCore::Env.truthy?("DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING")
108
+ end
109
+
101
110
  if wait_for_processing
102
- UI.important("Set environment variable DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING=true to skip waiting for screenshots to process")
111
+ UI.important("Will wait for screenshot image processing")
112
+ UI.important("Set env DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING=true to skip waiting for screenshots to process")
113
+ else
114
+ UI.important("Skipping the wait for screenshot image processing (which may affect submission)")
115
+ UI.important("Set env DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING=false to skip waiting for screenshots to process")
103
116
  end
104
117
 
105
118
  # Upload screenshots