fastlane 2.150.0.rc7 → 2.151.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +76 -76
  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_screenshots.rb.swp +0 -0
  7. data/deliver/lib/deliver/app_screenshot.rb +4 -4
  8. data/deliver/lib/deliver/download_screenshots.rb +4 -4
  9. data/deliver/lib/deliver/options.rb +7 -1
  10. data/deliver/lib/deliver/runner.rb +7 -3
  11. data/deliver/lib/deliver/submit_for_review.rb +7 -7
  12. data/deliver/lib/deliver/upload_metadata.rb +18 -15
  13. data/deliver/lib/deliver/upload_screenshots.rb +19 -6
  14. data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +3 -0
  15. data/fastlane/lib/fastlane/actions/notarize.rb +13 -3
  16. data/fastlane/lib/fastlane/actions/pod_push.rb +10 -1
  17. data/fastlane/lib/fastlane/actions/resign.rb +1 -1
  18. data/fastlane/lib/fastlane/actions/setup_ci.rb +5 -0
  19. data/fastlane/lib/fastlane/actions/setup_circle_ci.rb +1 -1
  20. data/fastlane/lib/fastlane/actions/setup_travis.rb +1 -1
  21. data/fastlane/lib/fastlane/actions/slather.rb +7 -0
  22. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +10 -2
  23. data/fastlane/lib/fastlane/documentation/docs_generator.rb +1 -1
  24. data/fastlane/lib/fastlane/helper/s3_client_helper.rb +28 -11
  25. data/fastlane/lib/fastlane/server/socket_server.rb +7 -1
  26. data/fastlane/lib/fastlane/swift_fastlane_function.rb +1 -1
  27. data/fastlane/lib/fastlane/version.rb +1 -1
  28. data/fastlane/swift/Actions.swift +1 -1
  29. data/fastlane/swift/ArgumentProcessor.swift +24 -24
  30. data/fastlane/swift/ControlCommand.swift +3 -3
  31. data/fastlane/swift/Deliverfile.swift +4 -8
  32. data/fastlane/swift/DeliverfileProtocol.swift +181 -182
  33. data/fastlane/swift/Fastlane.swift +2828 -2811
  34. data/fastlane/swift/Gymfile.swift +4 -8
  35. data/fastlane/swift/GymfileProtocol.swift +133 -134
  36. data/fastlane/swift/LaneFileProtocol.swift +17 -17
  37. data/fastlane/swift/Matchfile.swift +4 -8
  38. data/fastlane/swift/MatchfileProtocol.swift +115 -112
  39. data/fastlane/swift/Plugins.swift +1 -1
  40. data/fastlane/swift/Precheckfile.swift +4 -8
  41. data/fastlane/swift/PrecheckfileProtocol.swift +22 -23
  42. data/fastlane/swift/RubyCommand.swift +34 -37
  43. data/fastlane/swift/RubyCommandable.swift +3 -1
  44. data/fastlane/swift/Runner.swift +76 -69
  45. data/fastlane/swift/Scanfile.swift +4 -8
  46. data/fastlane/swift/ScanfileProtocol.swift +190 -191
  47. data/fastlane/swift/Screengrabfile.swift +4 -8
  48. data/fastlane/swift/ScreengrabfileProtocol.swift +67 -68
  49. data/fastlane/swift/Snapshotfile.swift +4 -8
  50. data/fastlane/swift/SnapshotfileProtocol.swift +127 -128
  51. data/fastlane/swift/SocketClient.swift +86 -91
  52. data/fastlane/swift/SocketResponse.swift +14 -14
  53. data/fastlane/swift/formatting/Brewfile +1 -0
  54. data/fastlane/swift/formatting/Brewfile.lock.json +39 -0
  55. data/fastlane/swift/formatting/Rakefile +18 -0
  56. data/fastlane/swift/main.swift +5 -6
  57. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +0 -1
  58. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +15 -7
  59. data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +1 -1
  60. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +1 -1
  61. data/{fastlane/lib/fastlane/actions/.hockey.rb.swp → frameit/lib/frameit/.editor.rb.swp} +0 -0
  62. data/match/lib/assets/READMETemplate.md +5 -2
  63. data/match/lib/match/options.rb +4 -0
  64. data/match/lib/match/runner.rb +1 -0
  65. data/match/lib/match/storage/git_storage.rb +1 -1
  66. data/match/lib/match/storage/s3_storage.rb +25 -7
  67. data/sigh/lib/assets/resign.sh +18 -0
  68. data/spaceship/lib/spaceship/{connect_api/.DS_Store → .DS_Store} +0 -0
  69. data/spaceship/lib/spaceship/client.rb +1 -2
  70. data/spaceship/lib/spaceship/connect_api.rb +2 -1
  71. data/{fastlane/lib/fastlane/actions/.slack.rb.swp → spaceship/lib/spaceship/connect_api/.file_uploader.rb.swp} +0 -0
  72. data/spaceship/lib/spaceship/connect_api/client.rb +0 -1
  73. data/spaceship/lib/spaceship/connect_api/models/.app_screenshot.rb.swp +0 -0
  74. data/spaceship/lib/spaceship/connect_api/models/app.rb +3 -3
  75. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +26 -2
  76. data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +3 -2
  77. data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +31 -2
  78. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +30 -2
  79. data/spaceship/lib/spaceship/connect_api/models/{app_review_attachment.rb → app_store_review_attachment.rb} +6 -6
  80. data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +7 -8
  81. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +3 -3
  82. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +11 -1
  83. data/spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb +64 -0
  84. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +74 -14
  85. metadata +54 -57
  86. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  87. data/spaceship/lib/spaceship/babosa_fix.rb +0 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34e85dcd86b90ee3b9187bc8417630a13c81188999870ddcc856dda2e11d2a7b
4
- data.tar.gz: a3f719e25bfaac439e8a5052e68b16d63f94e2c2e2cf66ad5411b55970eb7f34
3
+ metadata.gz: b4bf7968a4becc2d05ed76545854fd77129c73f42de52ab952a774f84d522caf
4
+ data.tar.gz: bc298406b0f0bf5ba4e3fea0a8bc0d982a3a80696c19f73e7213fbcd1f7cb738
5
5
  SHA512:
6
- metadata.gz: 0b769c9010489fab0525f1966896b3563e97877d2fa562d26614d3732a9f8a9e8cd08dc340043c094e9761892ff1c7aa469a09ff47744458a57f9d053cc06a3c
7
- data.tar.gz: 5c4165e619e55db0c588a2298d5242103a35b7d785f04d3458f2cd5b73d3c7184e550096791244d15ec4c75541447e2850bbefeb51e4041dfd36d87e656309df
6
+ metadata.gz: 7ae665a639dbecf4971f42a298e3c555b338f9cb8438da022d7cdd9d944e2416f6dc0c3b20e3b98efdba4f3ab0b77486c40a0818d06648c88299fcf2029b796f
7
+ data.tar.gz: e0e6de2a5fca85f486d96f1e1f43439ddab1613af18f72e873eb80d0c644122df16897d87f31654f8acc7ebdc4bdc399df1feb7d3a04553c645485d44115ca11
data/README.md CHANGED
@@ -34,49 +34,49 @@ 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'>
46
- </a>
47
- <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
48
- </td>
49
37
  <td id='joshua-liebowitz'>
50
38
  <a href='https://github.com/taquitos'>
51
39
  <img src='https://github.com/taquitos.png?size=140'>
52
40
  </a>
53
41
  <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
54
42
  </td>
55
- <td id='helmut-januschka'>
56
- <a href='https://github.com/hjanuschka'>
57
- <img src='https://github.com/hjanuschka.png?size=140'>
43
+ <td id='jérôme-lacoste'>
44
+ <a href='https://github.com/lacostej'>
45
+ <img src='https://github.com/lacostej.png?size=140'>
58
46
  </a>
59
- <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
47
+ <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
60
48
  </td>
61
- <td id='jorge-revuelta-h'>
62
- <a href='https://github.com/minuscorp'>
63
- <img src='https://github.com/minuscorp.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'>
64
52
  </a>
65
- <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
53
+ <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
54
+ </td>
55
+ <td id='josh-holtz'>
56
+ <a href='https://github.com/joshdholtz'>
57
+ <img src='https://github.com/joshdholtz.png?size=140'>
58
+ </a>
59
+ <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
60
+ </td>
61
+ <td id='max-ott'>
62
+ <a href='https://github.com/max-ott'>
63
+ <img src='https://github.com/max-ott.png?size=140'>
64
+ </a>
65
+ <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</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='jimmy-dee'>
70
+ <a href='https://github.com/jdee'>
71
+ <img src='https://github.com/jdee.png?size=140'>
72
72
  </a>
73
- <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
73
+ <h4 align='center'>Jimmy Dee</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='olivier-halligon'>
76
+ <a href='https://github.com/AliSoftware'>
77
+ <img src='https://github.com/AliSoftware.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/aligatr'>Olivier Halligon</a></h4>
80
80
  </td>
81
81
  <td id='jan-piotrowski'>
82
82
  <a href='https://github.com/janpio'>
@@ -84,31 +84,31 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
84
84
  </a>
85
85
  <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</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='kohki-miki'>
88
+ <a href='https://github.com/giginet'>
89
+ <img src='https://github.com/giginet.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/giginet'>Kohki Miki</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='luka-mirosevic'>
94
+ <a href='https://github.com/lmirosevic'>
95
+ <img src='https://github.com/lmirosevic.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/lmirosevic'>Luka Mirosevic</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='danielle-tomlinson'>
102
+ <a href='https://github.com/endocrimes'>
103
+ <img src='https://github.com/endocrimes.png?size=140'>
104
104
  </a>
105
- <h4 align='center'>Jimmy Dee</h4>
105
+ <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</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='fumiya-nakamura'>
108
+ <a href='https://github.com/nafu'>
109
+ <img src='https://github.com/nafu.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/nafu003'>Fumiya Nakamura</a></h4>
112
112
  </td>
113
113
  <td id='felix-krause'>
114
114
  <a href='https://github.com/KrauseFx'>
@@ -116,49 +116,49 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
116
116
  </a>
117
117
  <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</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'>
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'>
119
+ <td id='helmut-januschka'>
120
+ <a href='https://github.com/hjanuschka'>
121
+ <img src='https://github.com/hjanuschka.png?size=140'>
128
122
  </a>
129
- <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
123
+ <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
130
124
  </td>
131
- </tr>
132
- <tr>
133
125
  <td id='andrew-mcburney'>
134
126
  <a href='https://github.com/armcburney'>
135
127
  <img src='https://github.com/armcburney.png?size=140'>
136
128
  </a>
137
129
  <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
138
130
  </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'>
131
+ </tr>
132
+ <tr>
133
+ <td id='manu-wallner'>
134
+ <a href='https://github.com/milch'>
135
+ <img src='https://github.com/milch.png?size=140'>
142
136
  </a>
143
- <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
137
+ <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
144
138
  </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'>
139
+ <td id='daniel-jankowski'>
140
+ <a href='https://github.com/mollyIV'>
141
+ <img src='https://github.com/mollyIV.png?size=140'>
148
142
  </a>
149
- <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
143
+ <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
150
144
  </td>
151
- <td id='josh-holtz'>
152
- <a href='https://github.com/joshdholtz'>
153
- <img src='https://github.com/joshdholtz.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/joshdholtz'>Josh Holtz</a></h4>
149
+ <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
156
150
  </td>
157
- <td id='fumiya-nakamura'>
158
- <a href='https://github.com/nafu'>
159
- <img src='https://github.com/nafu.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/nafu003'>Fumiya Nakamura</a></h4>
155
+ <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
156
+ </td>
157
+ <td id='jorge-revuelta-h'>
158
+ <a href='https://github.com/minuscorp'>
159
+ <img src='https://github.com/minuscorp.png?size=140'>
160
+ </a>
161
+ <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
162
162
  </td>
163
163
  </tr>
164
164
  <tr>
@@ -168,11 +168,11 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
168
168
  </a>
169
169
  <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
170
170
  </td>
171
- <td id='kohki-miki'>
172
- <a href='https://github.com/giginet'>
173
- <img src='https://github.com/giginet.png?size=140'>
171
+ <td id='stefan-natchev'>
172
+ <a href='https://github.com/snatchev'>
173
+ <img src='https://github.com/snatchev.png?size=140'>
174
174
  </a>
175
- <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
175
+ <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
176
176
  </td>
177
177
  </table>
178
178
 
@@ -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}'")
@@ -165,11 +165,17 @@ module Deliver
165
165
  FastlaneCore::ConfigItem.new(key: :auto_release_date,
166
166
  env_name: "DELIVER_AUTO_RELEASE_DATE",
167
167
  description: "Date in milliseconds for automatically releasing on pending approval (Can not be used together with `automatic_release`)",
168
- is_string: false,
168
+ type: Integer,
169
169
  optional: true,
170
170
  conflicting_options: [:automatic_release],
171
171
  conflict_block: proc do |value|
172
172
  UI.user_error!("You can't use 'auto_release_date' and '#{value.key}' options together.")
173
+ end,
174
+ verify_block: proc do |value|
175
+ now_in_ms = Time.now.to_i * 1000
176
+ if value < now_in_ms
177
+ UI.user_error!("'#{value}' needs to be in the future and in milliseonds (current time is '#{now_in_ms}')")
178
+ end
173
179
  end),
174
180
  FastlaneCore::ConfigItem.new(key: :phased_release,
175
181
  env_name: "DELIVER_PHASED_RELEASE",
@@ -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
@@ -163,7 +166,8 @@ module Deliver
163
166
  app_id = legacy_app.apple_id
164
167
  app = Spaceship::ConnectAPI::App.get(app_id: app_id)
165
168
 
166
- if app.reject_version_if_possible!
169
+ platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
170
+ if app.reject_version_if_possible!(platform: platform)
167
171
  UI.success("Successfully rejected previous version!")
168
172
  end
169
173
  end
@@ -134,10 +134,10 @@ module Deliver
134
134
  # Create, update, or delete IDFA declaration
135
135
  if uses_idfa == false
136
136
  if idfa_declaration
137
- UI.verbose("Deleting IDFA delcaration")
137
+ UI.verbose("Deleting IDFA declaration")
138
138
  idfa_declaration.delete!
139
139
  updated_idfa = true
140
- UI.verbose("Deleted IDFA delcaration")
140
+ UI.verbose("Deleted IDFA declaration")
141
141
  end
142
142
  elsif uses_idfa == true
143
143
  attributes = {
@@ -148,19 +148,19 @@ module Deliver
148
148
  }
149
149
 
150
150
  if idfa_declaration
151
- UI.verbose("Updating IDFA delcaration")
151
+ UI.verbose("Updating IDFA declaration")
152
152
  idfa_declaration.update(attributes: attributes)
153
- UI.verbose("Updated IDFA delcaration")
153
+ UI.verbose("Updated IDFA declaration")
154
154
  else
155
- UI.verbose("Creating IDFA delcaration")
155
+ UI.verbose("Creating IDFA declaration")
156
156
  version.create_idfa_declaration(attributes: attributes)
157
- UI.verbose("Created IDFA delcaration")
157
+ UI.verbose("Created IDFA declaration")
158
158
  end
159
159
 
160
160
  updated_idfa = true
161
161
  end
162
162
 
163
- UI.success("Successfully updated IDFA delcarations on App Store Connect") if updated_idfa
163
+ UI.success("Successfully updated IDFA declarations on App Store Connect") if updated_idfa
164
164
  end
165
165
 
166
166
  def update_submission_information(options, app)
@@ -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
@@ -328,7 +330,7 @@ module Deliver
328
330
  seconds_in_hour = 60 * 60
329
331
  time_in_s_to_hour = (time_in_s / seconds_in_hour).to_i * seconds_in_hour
330
332
 
331
- return Time.at(time_in_s_to_hour).strftime("%Y-%m-%dT%H:%M:%S%:z")
333
+ return Time.at(time_in_s_to_hour).utc.strftime("%Y-%m-%dT%H:%M:%S%:z")
332
334
  end
333
335
 
334
336
  # If the user is using the 'default' language, then assign values where they are needed
@@ -405,7 +407,7 @@ module Deliver
405
407
  end
406
408
 
407
409
  # Finding languages to enable
408
- def verify_available_info_languages!(options, app)
410
+ def verify_available_info_languages!(options, app, languages)
409
411
  app_info = app.fetch_edit_app_info
410
412
 
411
413
  unless app_info
@@ -415,7 +417,7 @@ module Deliver
415
417
 
416
418
  localizations = app_info.get_app_info_localizations
417
419
 
418
- languages = (options[:languages] || []).reject { |lang| lang == "default" }
420
+ languages = (languages || []).reject { |lang| lang == "default" }
419
421
  locales_to_enable = languages - localizations.map(&:locale)
420
422
 
421
423
  if locales_to_enable.count > 0
@@ -439,7 +441,7 @@ module Deliver
439
441
  end
440
442
 
441
443
  # Finding languages to enable
442
- def verify_available_version_languages!(options, app)
444
+ def verify_available_version_languages!(options, app, languages)
443
445
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
444
446
  version = app.get_edit_app_store_version(platform: platform)
445
447
 
@@ -450,7 +452,7 @@ module Deliver
450
452
 
451
453
  localizations = version.get_app_store_version_localizations
452
454
 
453
- languages = (options[:languages] || []).reject { |lang| lang == "default" }
455
+ languages = (languages || []).reject { |lang| lang == "default" }
454
456
  locales_to_enable = languages - localizations.map(&:locale)
455
457
 
456
458
  if locales_to_enable.count > 0
@@ -548,7 +550,8 @@ module Deliver
548
550
  UI.message("Uploading app review information to App Store Connect")
549
551
  app_store_review_detail = begin
550
552
  version.fetch_app_store_review_detail
551
- rescue
553
+ rescue => error
554
+ UI.error("Error fetching app store review detail - #{error.message}")
552
555
  nil
553
556
  end # errors if doesn't exist
554
557
  if app_store_review_detail
@@ -560,19 +563,19 @@ module Deliver
560
563
 
561
564
  def set_review_attachment_file(version, options)
562
565
  app_store_review_detail = version.fetch_app_store_review_detail
563
- app_review_attachments = app_store_review_detail.fetch_app_review_attachments
566
+ app_store_review_attachments = app_store_review_detail.app_store_review_attachments || []
564
567
 
565
568
  if options[:app_review_attachment_file]
566
- app_review_attachments.each do |app_review_attachment|
569
+ app_store_review_attachments.each do |app_store_review_attachment|
567
570
  UI.message("Removing previous review attachment file from App Store Connect")
568
- app_review_attachment.delete!
571
+ app_store_review_attachment.delete!
569
572
  end
570
573
 
571
574
  UI.message("Uploading review attachment file to App Store Connect")
572
575
  app_store_review_detail.upload_attachment(path: options[:app_review_attachment_file])
573
576
  else
574
- app_review_attachments.each(&:delete!)
575
- 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?
576
579
  end
577
580
  end
578
581
 
@@ -611,8 +614,8 @@ module Deliver
611
614
  end
612
615
  UI.deprecated("You can find more info at https://docs.fastlane.tools/actions/deliver/#reference") if has_mapped_values
613
616
 
614
- age_rating_delcaration = version.fetch_age_rating_declaration
615
- age_rating_delcaration.update(attributes: attributes)
617
+ age_rating_declaration = version.fetch_age_rating_declaration
618
+ age_rating_declaration.update(attributes: attributes)
616
619
  end
617
620
  end
618
621
  # rubocop:enable Metrics/ClassLength