fastlane 2.150.0.rc6 → 2.150.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +78 -78
  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/app_screenshot.rb +4 -4
  9. data/deliver/lib/deliver/download_screenshots.rb +4 -4
  10. data/deliver/lib/deliver/runner.rb +11 -4
  11. data/deliver/lib/deliver/upload_metadata.rb +33 -14
  12. data/deliver/lib/deliver/upload_screenshots.rb +19 -6
  13. data/fastlane/lib/fastlane/actions/slather.rb +7 -0
  14. data/fastlane/lib/fastlane/version.rb +1 -1
  15. data/fastlane/swift/Deliverfile.swift +1 -1
  16. data/fastlane/swift/DeliverfileProtocol.swift +6 -6
  17. data/fastlane/swift/Fastlane.swift +21 -15
  18. data/fastlane/swift/Gymfile.swift +1 -1
  19. data/fastlane/swift/Matchfile.swift +1 -1
  20. data/fastlane/swift/Precheckfile.swift +1 -1
  21. data/fastlane/swift/Scanfile.swift +1 -1
  22. data/fastlane/swift/Screengrabfile.swift +1 -1
  23. data/fastlane/swift/Snapshotfile.swift +1 -1
  24. data/fastlane/swift/SocketClient.swift +2 -1
  25. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +0 -1
  26. data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +1 -1
  27. data/{fastlane/lib/fastlane/actions/.hockey.rb.swp → frameit/lib/frameit/.editor.rb.swp} +0 -0
  28. data/spaceship/lib/spaceship/{connect_api/.DS_Store → .DS_Store} +0 -0
  29. data/spaceship/lib/spaceship/connect_api.rb +2 -1
  30. data/{fastlane/lib/fastlane/actions/.slack.rb.swp → spaceship/lib/spaceship/connect_api/.file_uploader.rb.swp} +0 -0
  31. data/spaceship/lib/spaceship/connect_api/models/.app_screenshot.rb.swp +0 -0
  32. data/spaceship/lib/spaceship/connect_api/models/app.rb +22 -2
  33. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +29 -2
  34. data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +3 -2
  35. data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +31 -2
  36. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +30 -2
  37. data/spaceship/lib/spaceship/connect_api/models/{app_review_attachment.rb → app_store_review_attachment.rb} +6 -6
  38. data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +7 -8
  39. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +21 -3
  40. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +11 -1
  41. data/spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb +64 -0
  42. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +74 -14
  43. metadata +42 -38
  44. 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: 87c0c26f1a8fc4baab70230ea4478de1303401d512bce5564c7963f7d52aeee9
4
- data.tar.gz: 7093929e2f5d402e0623b5e2873a8178a8fcc74a711595ed9d038ca1e9f39e0d
3
+ metadata.gz: ef23a0fed00e3ec93bc286b3f34b22302da611a889c315013c63d929f218ecd7
4
+ data.tar.gz: e9155805e43cb051508414d3cf19db7b16c50fc5a1e280e944a5416a98dba32d
5
5
  SHA512:
6
- metadata.gz: f836a09c447b7b4ae447f6a78163a978620e104e06bf5f9b46fcbcbcad49baa089e153ab60aec1312d366a55e11369cc149de680d72f8e51582612c471b6f167
7
- data.tar.gz: cf0dd78f7208ce467c1be9fa1bd5bb5b9be1ffa8587ad0d9191c0370d41cc3aa8f1e8e92001fbcf7d7ee2e450d074c31111e6fde2eb23a500ced56cff87f34fc
6
+ metadata.gz: 7b5fc44bdda30345ee8f9034e3fadaf03db8689a032a9982db7afa979e1d148becdad574dd202b81a682d98a1a712f15a88575e31c392102e6287d8b0639c04c
7
+ data.tar.gz: 3019b6947b830e43e7214fcf0caf375e4f48d874bb168f52c146988dc86973e8cd7425bee83847808958c698c7eca3a9b8147ecc70092c444b10783e4a189f70
data/README.md CHANGED
@@ -34,29 +34,23 @@ 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'>
40
- </a>
41
- <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
42
- </td>
43
- <td id='stefan-natchev'>
44
- <a href='https://github.com/snatchev'>
45
- <img src='https://github.com/snatchev.png?size=140'>
37
+ <td id='matthew-ellis'>
38
+ <a href='https://github.com/matthewellis'>
39
+ <img src='https://github.com/matthewellis.png?size=140'>
46
40
  </a>
47
- <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
41
+ <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
48
42
  </td>
49
- <td id='joshua-liebowitz'>
50
- <a href='https://github.com/taquitos'>
51
- <img src='https://github.com/taquitos.png?size=140'>
43
+ <td id='jimmy-dee'>
44
+ <a href='https://github.com/jdee'>
45
+ <img src='https://github.com/jdee.png?size=140'>
52
46
  </a>
53
- <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
47
+ <h4 align='center'>Jimmy Dee</h4>
54
48
  </td>
55
- <td id='helmut-januschka'>
56
- <a href='https://github.com/hjanuschka'>
57
- <img src='https://github.com/hjanuschka.png?size=140'>
49
+ <td id='luka-mirosevic'>
50
+ <a href='https://github.com/lmirosevic'>
51
+ <img src='https://github.com/lmirosevic.png?size=140'>
58
52
  </a>
59
- <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
53
+ <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
60
54
  </td>
61
55
  <td id='jorge-revuelta-h'>
62
56
  <a href='https://github.com/minuscorp'>
@@ -64,83 +58,89 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
64
58
  </a>
65
59
  <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
66
60
  </td>
61
+ <td id='jérôme-lacoste'>
62
+ <a href='https://github.com/lacostej'>
63
+ <img src='https://github.com/lacostej.png?size=140'>
64
+ </a>
65
+ <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
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='stefan-natchev'>
70
+ <a href='https://github.com/snatchev'>
71
+ <img src='https://github.com/snatchev.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/snatchev'>Stefan Natchev</a></h4>
74
74
  </td>
75
- <td id='danielle-tomlinson'>
76
- <a href='https://github.com/endocrimes'>
77
- <img src='https://github.com/endocrimes.png?size=140'>
75
+ <td id='daniel-jankowski'>
76
+ <a href='https://github.com/mollyIV'>
77
+ <img src='https://github.com/mollyIV.png?size=140'>
78
78
  </a>
79
- <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
79
+ <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</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'>
81
+ <td id='iulian-onofrei'>
82
+ <a href='https://github.com/revolter'>
83
+ <img src='https://github.com/revolter.png?size=140'>
84
84
  </a>
85
- <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
85
+ <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
86
86
  </td>
87
- <td id='aaron-brager'>
88
- <a href='https://github.com/getaaron'>
89
- <img src='https://github.com/getaaron.png?size=140'>
87
+ <td id='felix-krause'>
88
+ <a href='https://github.com/KrauseFx'>
89
+ <img src='https://github.com/KrauseFx.png?size=140'>
90
90
  </a>
91
- <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
91
+ <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
92
92
  </td>
93
- <td id='olivier-halligon'>
94
- <a href='https://github.com/AliSoftware'>
95
- <img src='https://github.com/AliSoftware.png?size=140'>
93
+ <td id='maksym-grebenets'>
94
+ <a href='https://github.com/mgrebenets'>
95
+ <img src='https://github.com/mgrebenets.png?size=140'>
96
96
  </a>
97
- <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
97
+ <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
98
98
  </td>
99
99
  </tr>
100
100
  <tr>
101
- <td id='jimmy-dee'>
102
- <a href='https://github.com/jdee'>
103
- <img src='https://github.com/jdee.png?size=140'>
101
+ <td id='helmut-januschka'>
102
+ <a href='https://github.com/hjanuschka'>
103
+ <img src='https://github.com/hjanuschka.png?size=140'>
104
104
  </a>
105
- <h4 align='center'>Jimmy Dee</h4>
105
+ <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
106
106
  </td>
107
- <td id='daniel-jankowski'>
108
- <a href='https://github.com/mollyIV'>
109
- <img src='https://github.com/mollyIV.png?size=140'>
107
+ <td id='joshua-liebowitz'>
108
+ <a href='https://github.com/taquitos'>
109
+ <img src='https://github.com/taquitos.png?size=140'>
110
110
  </a>
111
- <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
111
+ <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
112
112
  </td>
113
- <td id='felix-krause'>
114
- <a href='https://github.com/KrauseFx'>
115
- <img src='https://github.com/KrauseFx.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'>
116
116
  </a>
117
- <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
117
+ <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
118
118
  </td>
119
- <td id='matthew-ellis'>
120
- <a href='https://github.com/matthewellis'>
121
- <img src='https://github.com/matthewellis.png?size=140'>
119
+ <td id='fumiya-nakamura'>
120
+ <a href='https://github.com/nafu'>
121
+ <img src='https://github.com/nafu.png?size=140'>
122
122
  </a>
123
- <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
123
+ <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
124
124
  </td>
125
- <td id='manu-wallner'>
126
- <a href='https://github.com/milch'>
127
- <img src='https://github.com/milch.png?size=140'>
125
+ <td id='aaron-brager'>
126
+ <a href='https://github.com/getaaron'>
127
+ <img src='https://github.com/getaaron.png?size=140'>
128
128
  </a>
129
- <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
129
+ <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
130
130
  </td>
131
131
  </tr>
132
132
  <tr>
133
- <td id='andrew-mcburney'>
134
- <a href='https://github.com/armcburney'>
135
- <img src='https://github.com/armcburney.png?size=140'>
133
+ <td id='josh-holtz'>
134
+ <a href='https://github.com/joshdholtz'>
135
+ <img src='https://github.com/joshdholtz.png?size=140'>
136
136
  </a>
137
- <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
137
+ <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
138
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'>
139
+ <td id='danielle-tomlinson'>
140
+ <a href='https://github.com/endocrimes'>
141
+ <img src='https://github.com/endocrimes.png?size=140'>
142
142
  </a>
143
- <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
143
+ <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
144
144
  </td>
145
145
  <td id='max-ott'>
146
146
  <a href='https://github.com/max-ott'>
@@ -148,25 +148,25 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
148
148
  </a>
149
149
  <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
150
150
  </td>
151
- <td id='josh-holtz'>
152
- <a href='https://github.com/joshdholtz'>
153
- <img src='https://github.com/joshdholtz.png?size=140'>
151
+ <td id='andrew-mcburney'>
152
+ <a href='https://github.com/armcburney'>
153
+ <img src='https://github.com/armcburney.png?size=140'>
154
154
  </a>
155
- <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
155
+ <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
156
156
  </td>
157
- <td id='fumiya-nakamura'>
158
- <a href='https://github.com/nafu'>
159
- <img src='https://github.com/nafu.png?size=140'>
157
+ <td id='jan-piotrowski'>
158
+ <a href='https://github.com/janpio'>
159
+ <img src='https://github.com/janpio.png?size=140'>
160
160
  </a>
161
- <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
161
+ <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
162
162
  </td>
163
163
  </tr>
164
164
  <tr>
165
- <td id='maksym-grebenets'>
166
- <a href='https://github.com/mgrebenets'>
167
- <img src='https://github.com/mgrebenets.png?size=140'>
165
+ <td id='manu-wallner'>
166
+ <a href='https://github.com/milch'>
167
+ <img src='https://github.com/milch.png?size=140'>
168
168
  </a>
169
- <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
169
+ <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
170
170
  </td>
171
171
  <td id='kohki-miki'>
172
172
  <a href='https://github.com/giginet'>
@@ -51,9 +51,9 @@ module Deliver
51
51
  # iPad iMessage
52
52
  IOS_IPAD_MESSAGES = "iOS-iPad-messages"
53
53
  # iPad 10.5 iMessage
54
- IOS_IPAD_10_5_MESSAGES = "iOS-10.5-messages"
54
+ IOS_IPAD_10_5_MESSAGES = "iOS-iPad-10.5-messages"
55
55
  # iPad 11 iMessage
56
- IOS_IPAD_11_MESSAGES = "iOS-11-messages"
56
+ IOS_IPAD_11_MESSAGES = "iOS-iPad-11-messages"
57
57
  # iPad Pro iMessage
58
58
  IOS_IPAD_PRO_MESSAGES = "iOS-iPad-Pro-messages"
59
59
  # iPad Pro (12.9-inch) (3rd generation) iMessage
@@ -113,8 +113,8 @@ module Deliver
113
113
  ScreenSize::IOS_58_MESSAGES => Spaceship::ConnectAPI::AppScreenshotSet::DisplayType::IMESSAGE_APP_IPHONE_58,
114
114
  ScreenSize::IOS_65_MESSAGES => Spaceship::ConnectAPI::AppScreenshotSet::DisplayType::IMESSAGE_APP_IPHONE_65,
115
115
  ScreenSize::IOS_IPAD_MESSAGES => Spaceship::ConnectAPI::AppScreenshotSet::DisplayType::IMESSAGE_APP_IPAD_97,
116
- ScreenSize::IOS_IPAD_PRO_MESSAGES => Spaceship::ConnectAPI::AppScreenshotSet::DisplayType::APP_IPAD_PRO_129,
117
- ScreenSize::IOS_IPAD_PRO_12_9_MESSAGES => Spaceship::ConnectAPI::AppScreenshotSet::DisplayType::APP_IPAD_PRO_3GEN_129,
116
+ ScreenSize::IOS_IPAD_PRO_MESSAGES => Spaceship::ConnectAPI::AppScreenshotSet::DisplayType::IMESSAGE_APP_IPAD_PRO_129,
117
+ ScreenSize::IOS_IPAD_PRO_12_9_MESSAGES => Spaceship::ConnectAPI::AppScreenshotSet::DisplayType::IMESSAGE_APP_IPAD_PRO_3GEN_129,
118
118
  ScreenSize::IOS_IPAD_10_5_MESSAGES => Spaceship::ConnectAPI::AppScreenshotSet::DisplayType::IMESSAGE_APP_IPAD_105,
119
119
  ScreenSize::IOS_IPAD_11_MESSAGES => Spaceship::ConnectAPI::AppScreenshotSet::DisplayType::IMESSAGE_APP_IPAD_PRO_3GEN_11,
120
120
  ScreenSize::MAC => Spaceship::ConnectAPI::AppScreenshotSet::DisplayType::APP_DESKTOP,
@@ -32,13 +32,13 @@ module Deliver
32
32
  screenshot_sets = localization.get_app_screenshot_sets
33
33
  screenshot_sets.each do |screenshot_set|
34
34
  screenshot_set.app_screenshots.each_with_index do |screenshot, index|
35
- url = screenshot.image_asset_url
36
- next if url.nil?
37
-
38
35
  file_name = [index, screenshot_set.screenshot_display_type, index].join("_")
39
- original_file_extension = File.basename(screenshot.file_name)
36
+ original_file_extension = File.extname(screenshot.file_name).strip.downcase[1..-1]
40
37
  file_name += "." + original_file_extension
41
38
 
39
+ url = screenshot.image_asset_url(type: original_file_extension)
40
+ next if url.nil?
41
+
42
42
  language = localization.locale
43
43
 
44
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,16 @@ 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
+ return Time.at(time_in_s_to_hour).utc.strftime("%Y-%m-%dT%H:%M:%S%:z")
334
+ end
335
+
318
336
  # If the user is using the 'default' language, then assign values where they are needed
319
337
  def assign_defaults(options)
320
338
  # Normalizes languages keys from symbols to strings
@@ -389,7 +407,7 @@ module Deliver
389
407
  end
390
408
 
391
409
  # Finding languages to enable
392
- def verify_available_info_languages!(options, app)
410
+ def verify_available_info_languages!(options, app, languages)
393
411
  app_info = app.fetch_edit_app_info
394
412
 
395
413
  unless app_info
@@ -399,7 +417,7 @@ module Deliver
399
417
 
400
418
  localizations = app_info.get_app_info_localizations
401
419
 
402
- languages = (options[:languages] || []).reject { |lang| lang == "default" }
420
+ languages = (languages || []).reject { |lang| lang == "default" }
403
421
  locales_to_enable = languages - localizations.map(&:locale)
404
422
 
405
423
  if locales_to_enable.count > 0
@@ -423,7 +441,7 @@ module Deliver
423
441
  end
424
442
 
425
443
  # Finding languages to enable
426
- def verify_available_version_languages!(options, app)
444
+ def verify_available_version_languages!(options, app, languages)
427
445
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
428
446
  version = app.get_edit_app_store_version(platform: platform)
429
447
 
@@ -434,7 +452,7 @@ module Deliver
434
452
 
435
453
  localizations = version.get_app_store_version_localizations
436
454
 
437
- languages = (options[:languages] || []).reject { |lang| lang == "default" }
455
+ languages = (languages || []).reject { |lang| lang == "default" }
438
456
  locales_to_enable = languages - localizations.map(&:locale)
439
457
 
440
458
  if locales_to_enable.count > 0
@@ -532,7 +550,8 @@ module Deliver
532
550
  UI.message("Uploading app review information to App Store Connect")
533
551
  app_store_review_detail = begin
534
552
  version.fetch_app_store_review_detail
535
- rescue
553
+ rescue => error
554
+ UI.error("Error fetching app store review detail - #{error.message}")
536
555
  nil
537
556
  end # errors if doesn't exist
538
557
  if app_store_review_detail
@@ -544,19 +563,19 @@ module Deliver
544
563
 
545
564
  def set_review_attachment_file(version, options)
546
565
  app_store_review_detail = version.fetch_app_store_review_detail
547
- app_review_attachments = app_store_review_detail.fetch_app_review_attachments
566
+ app_store_review_attachments = app_store_review_detail.app_store_review_attachments || []
548
567
 
549
568
  if options[:app_review_attachment_file]
550
- app_review_attachments.each do |app_review_attachment|
569
+ app_store_review_attachments.each do |app_store_review_attachment|
551
570
  UI.message("Removing previous review attachment file from App Store Connect")
552
- app_review_attachment.delete!
571
+ app_store_review_attachment.delete!
553
572
  end
554
573
 
555
574
  UI.message("Uploading review attachment file to App Store Connect")
556
575
  app_store_review_detail.upload_attachment(path: options[:app_review_attachment_file])
557
576
  else
558
- app_review_attachments.each(&:delete!)
559
- UI.message("Removing review attachment file to App Store Connect") unless app_review_attachments.empty?
577
+ app_store_review_attachments.each(&:delete!)
578
+ UI.message("Removing review attachment file to App Store Connect") unless app_store_review_attachments.empty?
560
579
  end
561
580
  end
562
581
 
@@ -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