fastlane 2.196.0 → 2.212.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +88 -81
- data/cert/lib/cert/runner.rb +19 -8
- data/deliver/lib/assets/ScreenshotsHelp +29 -6
- data/deliver/lib/deliver/app_screenshot.rb +30 -4
- data/deliver/lib/deliver/app_screenshot_iterator.rb +1 -1
- data/deliver/lib/deliver/options.rb +6 -2
- data/deliver/lib/deliver/runner.rb +88 -24
- data/deliver/lib/deliver/submit_for_review.rb +25 -3
- data/deliver/lib/deliver/upload_price_tier.rb +3 -1
- data/deliver/lib/deliver/upload_screenshots.rb +2 -2
- data/fastlane/lib/assets/AppfileTemplate +1 -1
- data/fastlane/lib/assets/AppfileTemplate.swift +1 -1
- data/fastlane/lib/fastlane/actions/badge.rb +1 -1
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +1 -1
- data/fastlane/lib/fastlane/actions/danger.rb +14 -0
- data/fastlane/lib/fastlane/actions/docs/build_app.md +5 -5
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +19 -2
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/run_tests.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +1 -1
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +62 -46
- data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +15 -4
- data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_push_certificate.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_version_number.rb +8 -3
- data/fastlane/lib/fastlane/actions/git_commit.rb +4 -6
- data/fastlane/lib/fastlane/actions/import_certificate.rb +1 -1
- data/fastlane/lib/fastlane/actions/notarize.rb +29 -11
- data/fastlane/lib/fastlane/actions/pod_lib_lint.rb +1 -1
- data/fastlane/lib/fastlane/actions/pod_push.rb +19 -1
- data/fastlane/lib/fastlane/actions/read_podspec.rb +1 -1
- data/fastlane/lib/fastlane/actions/run_tests.rb +19 -9
- data/fastlane/lib/fastlane/actions/set_github_release.rb +11 -5
- data/fastlane/lib/fastlane/actions/setup_ci.rb +13 -4
- data/fastlane/lib/fastlane/actions/trainer.rb +49 -0
- data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +31 -4
- data/fastlane/lib/fastlane/actions/update_info_plist.rb +1 -1
- data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +10 -1
- data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +1 -1
- data/fastlane/lib/fastlane/actions/verify_build.rb +1 -1
- data/fastlane/lib/fastlane/actions/xcode_install.rb +5 -1
- data/fastlane/lib/fastlane/actions/xcode_select.rb +1 -1
- data/fastlane/lib/fastlane/actions/xcodebuild.rb +8 -2
- data/fastlane/lib/fastlane/actions/xcodes.rb +152 -0
- data/fastlane/lib/fastlane/actions/xcov.rb +5 -0
- data/fastlane/lib/fastlane/actions/xcversion.rb +17 -7
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +5 -0
- data/fastlane/lib/fastlane/commands_generator.rb +2 -1
- data/fastlane/lib/fastlane/documentation/docs_generator.rb +17 -12
- data/fastlane/lib/fastlane/fast_file.rb +18 -5
- data/fastlane/lib/fastlane/features.rb +3 -0
- data/fastlane/lib/fastlane/helper/xcodebuild_formatter_helper.rb +9 -0
- data/fastlane/lib/fastlane/helper/xcodes_helper.rb +28 -0
- data/fastlane/lib/fastlane/helper/xcversion_helper.rb +0 -9
- data/fastlane/lib/fastlane/lane_manager.rb +1 -1
- data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +1 -1
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +5 -1
- data/fastlane/lib/fastlane/setup/setup_ios.rb +1 -1
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +1 -1
- data/fastlane/lib/fastlane/swift_lane_manager.rb +11 -3
- data/fastlane/lib/fastlane/swift_runner_upgrader.rb +54 -1
- data/fastlane/lib/fastlane/tools.rb +18 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Actions.swift +1 -1
- data/fastlane/swift/Appfile.swift +2 -2
- data/fastlane/swift/ArgumentProcessor.swift +1 -1
- data/fastlane/swift/Atomic.swift +150 -0
- data/fastlane/swift/ControlCommand.swift +1 -1
- data/fastlane/swift/Deliverfile.swift +2 -2
- data/fastlane/swift/DeliverfileProtocol.swift +8 -4
- data/fastlane/swift/Fastlane.swift +570 -239
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +30 -20
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +1 -1
- data/fastlane/swift/Gymfile.swift +2 -2
- data/fastlane/swift/GymfileProtocol.swift +20 -8
- data/fastlane/swift/LaneFileProtocol.swift +2 -2
- data/fastlane/swift/MainProcess.swift +3 -3
- data/fastlane/swift/Matchfile.swift +2 -2
- data/fastlane/swift/MatchfileProtocol.swift +21 -5
- data/fastlane/swift/OptionalConfigValue.swift +1 -1
- data/fastlane/swift/Plugins.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +2 -2
- data/fastlane/swift/PrecheckfileProtocol.swift +3 -3
- data/fastlane/swift/RubyCommand.swift +1 -1
- data/fastlane/swift/RubyCommandable.swift +1 -1
- data/fastlane/swift/Runner.swift +13 -9
- data/fastlane/swift/RunnerArgument.swift +1 -1
- data/fastlane/swift/Scanfile.swift +2 -2
- data/fastlane/swift/ScanfileProtocol.swift +31 -11
- data/fastlane/swift/Screengrabfile.swift +2 -2
- data/fastlane/swift/ScreengrabfileProtocol.swift +3 -3
- data/fastlane/swift/Snapshotfile.swift +2 -2
- data/fastlane/swift/SnapshotfileProtocol.swift +12 -8
- data/fastlane/swift/SocketClient.swift +9 -5
- data/fastlane/swift/SocketClientDelegateProtocol.swift +2 -2
- data/fastlane/swift/SocketResponse.swift +1 -1
- data/fastlane/swift/formatting/Brewfile.lock.json +46 -23
- data/fastlane/swift/main.swift +1 -1
- data/fastlane/swift/upgrade_manifest.json +1 -1
- data/fastlane_core/README.md +1 -0
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +79 -17
- data/fastlane_core/lib/fastlane_core/device_manager.rb +5 -1
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +10 -5
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +409 -26
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -0
- data/fastlane_core/lib/fastlane_core/project.rb +19 -2
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +7 -0
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +4 -2
- data/frameit/lib/frameit/device.rb +1 -1
- data/frameit/lib/frameit/device_types.rb +9 -0
- data/frameit/lib/frameit/editor.rb +16 -18
- data/frameit/lib/frameit/frame_downloader.rb +1 -1
- data/frameit/lib/frameit/trim_box.rb +6 -0
- data/gym/lib/gym/generators/build_command_generator.rb +70 -23
- data/gym/lib/gym/options.rb +30 -5
- data/match/lib/match/change_password.rb +2 -0
- data/match/lib/match/commands_generator.rb +2 -1
- data/match/lib/match/encryption/openssl.rb +1 -1
- data/match/lib/match/encryption.rb +3 -0
- data/match/lib/match/generator.rb +1 -0
- data/match/lib/match/importer.rb +10 -1
- data/match/lib/match/migrate.rb +4 -3
- data/match/lib/match/module.rb +54 -2
- data/match/lib/match/nuke.rb +114 -47
- data/match/lib/match/options.rb +22 -1
- data/match/lib/match/runner.rb +25 -6
- data/match/lib/match/setup.rb +1 -1
- data/match/lib/match/spaceship_ensure.rb +5 -2
- data/match/lib/match/storage/gitlab/client.rb +102 -0
- data/match/lib/match/storage/gitlab/secure_file.rb +65 -0
- data/match/lib/match/storage/gitlab_secure_files.rb +182 -0
- data/match/lib/match/storage/google_cloud_storage.rb +7 -6
- data/match/lib/match/storage/s3_storage.rb +3 -3
- data/match/lib/match/storage.rb +4 -0
- data/match/lib/match/table_printer.rb +2 -1
- data/match/lib/match/utils.rb +15 -2
- data/pem/lib/pem/manager.rb +30 -7
- data/pem/lib/pem/options.rb +9 -0
- data/pilot/lib/pilot/build_manager.rb +34 -14
- data/pilot/lib/pilot/options.rb +6 -1
- data/scan/lib/scan/detect_values.rb +6 -0
- data/scan/lib/scan/error_handler.rb +9 -0
- data/scan/lib/scan/options.rb +49 -9
- data/scan/lib/scan/runner.rb +171 -25
- data/scan/lib/scan/test_command_generator.rb +65 -5
- data/sigh/lib/sigh/download_all.rb +14 -2
- data/sigh/lib/sigh/module.rb +3 -1
- data/sigh/lib/sigh/options.rb +5 -0
- data/sigh/lib/sigh/runner.rb +12 -2
- data/snapshot/lib/assets/SnapshotHelper.swift +3 -3
- data/snapshot/lib/snapshot/latest_os_version.rb +2 -5
- data/snapshot/lib/snapshot/options.rb +24 -8
- data/snapshot/lib/snapshot/reports_generator.rb +1 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +10 -3
- data/snapshot/lib/snapshot/test_command_generator.rb +37 -2
- data/spaceship/lib/spaceship/client.rb +71 -40
- data/spaceship/lib/spaceship/commands_generator.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/api_client.rb +10 -5
- data/spaceship/lib/spaceship/connect_api/models/actor.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +52 -6
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +1 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +7 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +27 -10
- data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -2
- data/spaceship/lib/spaceship/connect_api/models/build_bundle.rb +68 -0
- data/spaceship/lib/spaceship/connect_api/models/build_bundle_file_sizes.rb +34 -0
- data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +2 -1
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/device.rb +47 -4
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/resolution_center_message.rb +29 -0
- data/spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb +67 -0
- data/spaceship/lib/spaceship/connect_api/models/review_rejection.rb +19 -0
- data/spaceship/lib/spaceship/connect_api/models/review_submission.rb +86 -0
- data/spaceship/lib/spaceship/connect_api/models/review_submission_item.rb +40 -0
- data/spaceship/lib/spaceship/connect_api/models/user.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +19 -0
- data/spaceship/lib/spaceship/connect_api/response.rb +23 -6
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +33 -2
- data/spaceship/lib/spaceship/connect_api/token.rb +5 -2
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +124 -8
- data/spaceship/lib/spaceship/connect_api.rb +9 -0
- data/spaceship/lib/spaceship/errors.rb +34 -0
- data/spaceship/lib/spaceship/globals.rb +9 -0
- data/spaceship/lib/spaceship/hashcash.rb +52 -0
- data/spaceship/lib/spaceship/portal/certificate.rb +4 -3
- data/spaceship/lib/spaceship/spaceauth_runner.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_ratings.rb +6 -6
- data/spaceship/lib/spaceship/tunes/iap_families.rb +1 -1
- data/spaceship/lib/spaceship/tunes/tunes.rb +0 -1
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +79 -21
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +11 -3
- data/spaceship/lib/spaceship.rb +1 -0
- data/supply/lib/supply/client.rb +2 -7
- data/supply/lib/supply/options.rb +8 -0
- data/supply/lib/supply/uploader.rb +6 -2
- data/trainer/lib/assets/junit.xml.erb +28 -0
- data/trainer/lib/trainer/commands_generator.rb +51 -0
- data/trainer/lib/trainer/junit_generator.rb +31 -0
- data/trainer/lib/trainer/module.rb +10 -0
- data/trainer/lib/trainer/options.rb +66 -0
- data/trainer/lib/trainer/test_parser.rb +398 -0
- data/trainer/lib/trainer/xcresult.rb +403 -0
- data/trainer/lib/trainer.rb +7 -0
- metadata +49 -24
- data/spaceship/lib/spaceship/connect_api/testflight/.testflight.rb.swp +0 -0
- data/spaceship/lib/spaceship/tunes/user_detail.rb +0 -15
@@ -46,6 +46,12 @@ module Deliver
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def run
|
49
|
+
if options[:verify_only]
|
50
|
+
UI.important("Verify flag is set, only package validation will take place and no submission will be made")
|
51
|
+
verify_binary
|
52
|
+
return
|
53
|
+
end
|
54
|
+
|
49
55
|
verify_version if options[:app_version].to_s.length > 0 && !options[:skip_app_version_update]
|
50
56
|
|
51
57
|
# Rejecting before upload meta
|
@@ -155,39 +161,74 @@ module Deliver
|
|
155
161
|
UploadPriceTier.new.upload(options)
|
156
162
|
end
|
157
163
|
|
164
|
+
# Verify the binary with App Store Connect
|
165
|
+
def verify_binary
|
166
|
+
UI.message("Verifying binary with App Store Connect")
|
167
|
+
|
168
|
+
ipa_path = options[:ipa]
|
169
|
+
pkg_path = options[:pkg]
|
170
|
+
|
171
|
+
platform = options[:platform]
|
172
|
+
transporter = transporter_for_selected_team
|
173
|
+
|
174
|
+
case platform
|
175
|
+
when "ios", "appletvos"
|
176
|
+
package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(
|
177
|
+
app_id: Deliver.cache[:app].id,
|
178
|
+
ipa_path: ipa_path,
|
179
|
+
package_path: "/tmp",
|
180
|
+
platform: platform
|
181
|
+
)
|
182
|
+
result = transporter.verify(package_path: package_path, asset_path: ipa_path, platform: platform)
|
183
|
+
when "osx"
|
184
|
+
package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(
|
185
|
+
app_id: Deliver.cache[:app].id,
|
186
|
+
pkg_path: pkg_path,
|
187
|
+
package_path: "/tmp",
|
188
|
+
platform: platform
|
189
|
+
)
|
190
|
+
result = transporter.verify(package_path: package_path, asset_path: pkg_path, platform: platform)
|
191
|
+
else
|
192
|
+
UI.user_error!("No suitable file found for verify for platform: #{options[:platform]}")
|
193
|
+
end
|
194
|
+
|
195
|
+
unless result
|
196
|
+
transporter_errors = transporter.displayable_errors
|
197
|
+
UI.user_error!("Error verifying the binary file: \n #{transporter_errors}")
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
158
201
|
# Upload the binary to App Store Connect
|
159
202
|
def upload_binary
|
160
203
|
UI.message("Uploading binary to App Store Connect")
|
161
204
|
|
162
|
-
|
163
|
-
|
205
|
+
ipa_path = options[:ipa]
|
206
|
+
pkg_path = options[:pkg]
|
164
207
|
|
165
|
-
|
166
|
-
|
167
|
-
if upload_ipa && upload_pkg
|
168
|
-
upload_ipa = ["ios", "appletvos"].include?(options[:platform])
|
169
|
-
upload_pkg = options[:platform] == "osx"
|
170
|
-
end
|
208
|
+
platform = options[:platform]
|
209
|
+
transporter = transporter_for_selected_team
|
171
210
|
|
172
|
-
|
211
|
+
case platform
|
212
|
+
when "ios", "appletvos"
|
173
213
|
package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(
|
174
214
|
app_id: Deliver.cache[:app].id,
|
175
|
-
ipa_path:
|
215
|
+
ipa_path: ipa_path,
|
176
216
|
package_path: "/tmp",
|
177
|
-
platform:
|
217
|
+
platform: platform
|
178
218
|
)
|
179
|
-
|
219
|
+
result = transporter.upload(package_path: package_path, asset_path: ipa_path, platform: platform)
|
220
|
+
when "osx"
|
180
221
|
package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(
|
181
222
|
app_id: Deliver.cache[:app].id,
|
182
|
-
pkg_path:
|
223
|
+
pkg_path: pkg_path,
|
183
224
|
package_path: "/tmp",
|
184
|
-
platform:
|
225
|
+
platform: platform
|
185
226
|
)
|
227
|
+
result = transporter.upload(package_path: package_path, asset_path: pkg_path, platform: platform)
|
228
|
+
else
|
229
|
+
UI.user_error!("No suitable file found for upload for platform: #{options[:platform]}")
|
186
230
|
end
|
187
231
|
|
188
|
-
transporter = transporter_for_selected_team
|
189
|
-
result = transporter.upload(package_path: package_path)
|
190
|
-
|
191
232
|
unless result
|
192
233
|
transporter_errors = transporter.displayable_errors
|
193
234
|
UI.user_error!("Error uploading ipa file: \n #{transporter_errors}")
|
@@ -197,8 +238,21 @@ module Deliver
|
|
197
238
|
def reject_version_if_possible
|
198
239
|
app = Deliver.cache[:app]
|
199
240
|
platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
|
200
|
-
|
201
|
-
|
241
|
+
|
242
|
+
submission = app.get_in_progress_review_submission(platform: platform)
|
243
|
+
if submission
|
244
|
+
submission.cancel_submission
|
245
|
+
UI.message("Review submission cancellation has been requested")
|
246
|
+
|
247
|
+
# An app version won't get removed from review instantly
|
248
|
+
# Polling until there is no longer an in-progress version
|
249
|
+
loop do
|
250
|
+
break if app.get_in_progress_review_submission(platform: platform).nil?
|
251
|
+
UI.message("Waiting for cancellation to take effect...")
|
252
|
+
sleep(15)
|
253
|
+
end
|
254
|
+
|
255
|
+
UI.success("Successfully cancelled previous submission!")
|
202
256
|
end
|
203
257
|
end
|
204
258
|
|
@@ -215,22 +269,32 @@ module Deliver
|
|
215
269
|
def transporter_for_selected_team
|
216
270
|
# Use JWT auth
|
217
271
|
api_token = Spaceship::ConnectAPI.token
|
272
|
+
api_key = if options[:api_key].nil? && !api_token.nil?
|
273
|
+
# Load api key info if user set api_key_path, not api_key
|
274
|
+
{ key_id: api_token.key_id, issuer_id: api_token.issuer_id, key: api_token.key_raw }
|
275
|
+
elsif !options[:api_key].nil?
|
276
|
+
api_key = options[:api_key].transform_keys(&:to_sym).dup
|
277
|
+
# key is still base 64 style if api_key is loaded from option
|
278
|
+
api_key[:key] = Base64.decode64(api_key[:key]) if api_key[:is_key_content_base64]
|
279
|
+
api_key
|
280
|
+
end
|
281
|
+
|
218
282
|
unless api_token.nil?
|
219
283
|
api_token.refresh! if api_token.expired?
|
220
|
-
return FastlaneCore::ItunesTransporter.new(nil, nil, false, nil, api_token.text)
|
284
|
+
return FastlaneCore::ItunesTransporter.new(nil, nil, false, nil, api_token.text, altool_compatible_command: true, api_key: api_key)
|
221
285
|
end
|
222
286
|
|
223
287
|
tunes_client = Spaceship::ConnectAPI.client.tunes_client
|
224
288
|
|
225
|
-
generic_transporter = FastlaneCore::ItunesTransporter.new(options[:username], nil, false, options[:itc_provider])
|
289
|
+
generic_transporter = FastlaneCore::ItunesTransporter.new(options[:username], nil, false, options[:itc_provider], altool_compatible_command: true, api_key: api_key)
|
226
290
|
return generic_transporter unless options[:itc_provider].nil? && tunes_client.teams.count > 1
|
227
291
|
|
228
292
|
begin
|
229
|
-
team = tunes_client.teams.find { |t| t['
|
230
|
-
name = team['
|
293
|
+
team = tunes_client.teams.find { |t| t['providerId'].to_s == tunes_client.team_id }
|
294
|
+
name = team['name']
|
231
295
|
provider_id = generic_transporter.provider_ids[name]
|
232
296
|
UI.verbose("Inferred provider id #{provider_id} for team #{name}.")
|
233
|
-
return FastlaneCore::ItunesTransporter.new(options[:username], nil, false, provider_id)
|
297
|
+
return FastlaneCore::ItunesTransporter.new(options[:username], nil, false, provider_id, altool_compatible_command: true, api_key: api_key)
|
234
298
|
rescue => ex
|
235
299
|
UI.verbose("Couldn't infer a provider short name for team with id #{tunes_client.team_id} automatically: #{ex}. Proceeding without provider short name.")
|
236
300
|
return generic_transporter
|
@@ -23,12 +23,34 @@ module Deliver
|
|
23
23
|
update_idfa(options, app, version)
|
24
24
|
update_submission_information(options, app)
|
25
25
|
|
26
|
-
version
|
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
|
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
|
|
@@ -12,7 +12,9 @@ module Deliver
|
|
12
12
|
app = Deliver.cache[:app]
|
13
13
|
|
14
14
|
attributes = {}
|
15
|
-
|
15
|
+
|
16
|
+
# Check App update method to understand how to use territory_ids.
|
17
|
+
territory_ids = nil # nil won't update app's territory_ids, empty array would remove app from sale.
|
16
18
|
|
17
19
|
# As of 2020-09-14:
|
18
20
|
# Official App Store Connect does not have an endpoint to get app prices for an app
|
@@ -145,7 +145,7 @@ module Deliver
|
|
145
145
|
if duplicate
|
146
146
|
UI.message("Previous uploaded. Skipping '#{screenshot.path}'...")
|
147
147
|
else
|
148
|
-
UI.verbose("Queued
|
148
|
+
UI.verbose("Queued upload sceeenshot job for #{localization.locale} #{app_screenshot_set.screenshot_display_type} #{screenshot.path}")
|
149
149
|
worker.enqueue(UploadScreenshotJob.new(app_screenshot_set, screenshot.path))
|
150
150
|
number_of_screenshots_per_set[app_screenshot_set] += 1
|
151
151
|
end
|
@@ -157,7 +157,7 @@ module Deliver
|
|
157
157
|
|
158
158
|
UI.verbose('Uploading jobs are completed')
|
159
159
|
|
160
|
-
Helper.show_loading_indicator("Waiting for all the screenshots processed...")
|
160
|
+
Helper.show_loading_indicator("Waiting for all the screenshots to finish being processed...")
|
161
161
|
states = wait_for_complete(iterator)
|
162
162
|
Helper.hide_loading_indicator
|
163
163
|
retry_upload_screenshots_if_needed(iterator, states, total_number_of_screenshots, tries, localizations, screenshots_per_language)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
var appIdentifier: String { return "[[APP_IDENTIFIER]]" } // The bundle identifier of your app
|
2
|
-
var appleID: String { return "[[APPLE_ID]]" } // Your Apple
|
2
|
+
var appleID: String { return "[[APPLE_ID]]" } // Your Apple Developer Portal username
|
3
3
|
|
4
4
|
[[TEAMS]]
|
5
5
|
|
@@ -63,7 +63,7 @@ module Fastlane
|
|
63
63
|
[
|
64
64
|
FastlaneCore::ConfigItem.new(key: :dark,
|
65
65
|
env_name: "FL_BADGE_DARK",
|
66
|
-
description: "Adds a dark flavored badge
|
66
|
+
description: "Adds a dark flavored badge on top of your icon",
|
67
67
|
optional: true,
|
68
68
|
type: Boolean,
|
69
69
|
verify_block: proc do |value|
|
@@ -141,7 +141,7 @@ module Fastlane
|
|
141
141
|
end),
|
142
142
|
FastlaneCore::ConfigItem.new(key: :merge_commit_filtering,
|
143
143
|
env_name: 'FL_CHANGELOG_FROM_GIT_COMMITS_MERGE_COMMIT_FILTERING',
|
144
|
-
description: "Controls inclusion of merge commits when collecting the changelog. Valid values: #{GIT_MERGE_COMMIT_FILTERING_OPTIONS.map { |o| "
|
144
|
+
description: "Controls inclusion of merge commits when collecting the changelog. Valid values: #{GIT_MERGE_COMMIT_FILTERING_OPTIONS.map { |o| "'#{o}'" }.join(', ')}",
|
145
145
|
optional: true,
|
146
146
|
default_value: 'include_merges',
|
147
147
|
verify_block: proc do |value|
|
@@ -25,6 +25,8 @@ module Fastlane
|
|
25
25
|
cmd << "pr #{pr}" if pr
|
26
26
|
|
27
27
|
ENV['DANGER_GITHUB_API_TOKEN'] = params[:github_api_token] if params[:github_api_token]
|
28
|
+
ENV['DANGER_GITHUB_HOST'] = params[:github_enterprise_host] if params[:github_enterprise_host]
|
29
|
+
ENV['DANGER_GITHUB_API_BASE_URL'] = params[:github_enterprise_api_base_url] if params[:github_enterprise_api_base_url]
|
28
30
|
|
29
31
|
Actions.sh(cmd.join(' '))
|
30
32
|
end
|
@@ -66,6 +68,18 @@ module Fastlane
|
|
66
68
|
sensitive: true,
|
67
69
|
code_gen_sensitive: true,
|
68
70
|
optional: true),
|
71
|
+
FastlaneCore::ConfigItem.new(key: :github_enterprise_host,
|
72
|
+
env_name: "FL_DANGER_GITHUB_ENTERPRISE_HOST",
|
73
|
+
description: "GitHub host URL for GitHub Enterprise",
|
74
|
+
sensitive: true,
|
75
|
+
code_gen_sensitive: true,
|
76
|
+
optional: true),
|
77
|
+
FastlaneCore::ConfigItem.new(key: :github_enterprise_api_base_url,
|
78
|
+
env_name: "FL_DANGER_GITHUB_ENTERPRISE_API_BASE_URL",
|
79
|
+
description: "GitHub API base URL for GitHub Enterprise",
|
80
|
+
sensitive: true,
|
81
|
+
code_gen_sensitive: true,
|
82
|
+
optional: true),
|
69
83
|
FastlaneCore::ConfigItem.new(key: :fail_on_errors,
|
70
84
|
env_name: "FL_DANGER_FAIL_ON_ERRORS",
|
71
85
|
description: "Should always fail the build process, defaults to false",
|
@@ -74,7 +74,7 @@ That's all you need to build your application. If you want more control, here ar
|
|
74
74
|
fastlane gym --workspace "Example.xcworkspace" --scheme "AppName" --clean
|
75
75
|
```
|
76
76
|
|
77
|
-
If you need to use a different Xcode installation, use `
|
77
|
+
If you need to use a different Xcode installation, use `[xcodes](https://docs.fastlane.tools/actions/xcodes)` or define `DEVELOPER_DIR`:
|
78
78
|
|
79
79
|
```no-highlight
|
80
80
|
DEVELOPER_DIR="/Applications/Xcode6.2.app" fastlane gym
|
@@ -150,7 +150,7 @@ build_app(
|
|
150
150
|
scheme: "Release",
|
151
151
|
export_method: "app-store",
|
152
152
|
export_options: {
|
153
|
-
provisioningProfiles: {
|
153
|
+
provisioningProfiles: {
|
154
154
|
"com.example.bundleid" => "Provisioning Profile Name",
|
155
155
|
"com.example.bundleid2" => "Provisioning Profile Name 2"
|
156
156
|
}
|
@@ -184,10 +184,10 @@ end
|
|
184
184
|
error do |lane, exception|
|
185
185
|
slack(
|
186
186
|
# message with short human friendly message
|
187
|
-
message: exception.to_s,
|
188
|
-
success: false,
|
187
|
+
message: exception.to_s,
|
188
|
+
success: false,
|
189
189
|
# Output containing extended log output
|
190
|
-
payload: { "Output" => exception.error_info.to_s }
|
190
|
+
payload: { "Output" => exception.error_info.to_s }
|
191
191
|
)
|
192
192
|
end
|
193
193
|
```
|
@@ -25,6 +25,7 @@ gem install fastlane
|
|
25
25
|
```
|
26
26
|
|
27
27
|
##### Gradle dependency
|
28
|
+
|
28
29
|
```java
|
29
30
|
androidTestImplementation 'tools.fastlane:screengrab:x.x.x'
|
30
31
|
```
|
@@ -60,17 +61,23 @@ Ensure that the following permissions exist in your **src/debug/AndroidManifest.
|
|
60
61
|
##### Configuring your <a href="#ui-tests">UI Tests</a> for Screenshots
|
61
62
|
|
62
63
|
1. Add `LocaleTestRule` to your tests class to handle automatic switching of locales.
|
64
|
+
|
63
65
|
If you're using Java use:
|
66
|
+
|
64
67
|
```java
|
65
68
|
@ClassRule
|
66
69
|
public static final LocaleTestRule localeTestRule = new LocaleTestRule();
|
67
70
|
```
|
71
|
+
|
68
72
|
If you're using Kotlin use:
|
73
|
+
|
69
74
|
```kotlin
|
70
75
|
@Rule @JvmField
|
71
76
|
val localeTestRule = LocaleTestRule()
|
72
77
|
```
|
78
|
+
|
73
79
|
The `@JvmField` annotation is important. It won't work like this:
|
80
|
+
|
74
81
|
```kotlin
|
75
82
|
companion object {
|
76
83
|
@get:ClassRule
|
@@ -84,6 +91,7 @@ Ensure that the following permissions exist in your **src/debug/AndroidManifest.
|
|
84
91
|
- Then, before running `fastlane screengrab` you'll need a debug and test apk
|
85
92
|
- You can create your APKs manually with `./gradlew assembleDebug assembleAndroidTest`
|
86
93
|
- You can also create a lane and use `build_android_app`:
|
94
|
+
|
87
95
|
```ruby
|
88
96
|
desc "Build debug and test APK for screenshots"
|
89
97
|
lane :build_and_screengrab do
|
@@ -163,7 +171,9 @@ fastlane action screengrab
|
|
163
171
|
Check out [Testing UI for a Single App](http://developer.android.com/training/testing/ui-testing/espresso-testing.html) for an introduction to using Espresso for UI testing.
|
164
172
|
|
165
173
|
##### Example UI Test Class (Using JUnit4)
|
174
|
+
|
166
175
|
Java:
|
176
|
+
|
167
177
|
```java
|
168
178
|
@RunWith(JUnit4.class)
|
169
179
|
public class JUnit4StyleTests {
|
@@ -182,9 +192,10 @@ public class JUnit4StyleTests {
|
|
182
192
|
Screengrab.screenshot("after_button_click");
|
183
193
|
}
|
184
194
|
}
|
185
|
-
|
186
195
|
```
|
196
|
+
|
187
197
|
Kotlin:
|
198
|
+
|
188
199
|
```kotlin
|
189
200
|
@RunWith(JUnit4.class)
|
190
201
|
class JUnit4StyleTests {
|
@@ -203,7 +214,6 @@ class JUnit4StyleTests {
|
|
203
214
|
Screengrab.screenshot("after_button_click")
|
204
215
|
}
|
205
216
|
}
|
206
|
-
|
207
217
|
```
|
208
218
|
|
209
219
|
There is an [example project](https://github.com/fastlane/fastlane/tree/master/screengrab/example/src/androidTest/java/tools/fastlane/localetester) showing how to use JUnit 3 or 4 and Espresso with the screengrab Java library to capture screenshots during a UI test run.
|
@@ -224,6 +234,7 @@ Note: the clean status bar feature is only supported on devices with *API level
|
|
224
234
|
|
225
235
|
You can enable and disable the clean status bar at any moment during your tests.
|
226
236
|
In most cases you probably want to do this in the @BeforeClass and @AfterClass methods.
|
237
|
+
|
227
238
|
```java
|
228
239
|
@BeforeClass
|
229
240
|
public static void beforeAll() {
|
@@ -238,6 +249,7 @@ public static void afterAll() {
|
|
238
249
|
|
239
250
|
Have a look at the methods of the `CleanStatusBar` class to customize the status bar even more.
|
240
251
|
You could for example show the Bluetooth icon and the LTE text.
|
252
|
+
|
241
253
|
```java
|
242
254
|
new CleanStatusBar()
|
243
255
|
.setBluetoothState(BluetoothState.DISCONNECTED)
|
@@ -283,6 +295,7 @@ if (extras != null) {
|
|
283
295
|
For some apps, it is helpful to know when _screengrab_ is running so that you can display specific data for your screenshots. For iOS fastlane users, this is much like "FASTLANE_SNAPSHOT". In order to do this, you'll need to have at least two product flavors of your app.
|
284
296
|
|
285
297
|
Add two product flavors to the app-level build.gradle file:
|
298
|
+
|
286
299
|
```
|
287
300
|
android {
|
288
301
|
...
|
@@ -300,6 +313,7 @@ android {
|
|
300
313
|
```
|
301
314
|
|
302
315
|
Check for the existence of that flavor (i.e screengrab) in your app code as follows in order to use mock data or customize data for screenshots:
|
316
|
+
|
303
317
|
```
|
304
318
|
if (BuildConfig.FLAVOR == "screengrab") {
|
305
319
|
System.out.println("screengrab is running!");
|
@@ -307,14 +321,17 @@ if (BuildConfig.FLAVOR == "screengrab") {
|
|
307
321
|
```
|
308
322
|
|
309
323
|
When running _screengrab_, do the following to build the flavor you want as well as the test apk. Note that you use "assembleFlavor_name" where Flavor_name is the flavor name, capitalized (i.e. Screengrab).
|
324
|
+
|
310
325
|
```
|
311
326
|
./gradlew assembleScreengrab assembleAndroidTest
|
312
327
|
```
|
313
328
|
|
314
329
|
Run _screengrab_:
|
330
|
+
|
315
331
|
```
|
316
332
|
fastlane screengrab
|
317
333
|
```
|
334
|
+
|
318
335
|
_screengrab_ will ask you to select the debug and test apps (which you can then add to your Screengrabfile to skip this step later).
|
319
336
|
|
320
337
|
The debug apk should be somewhere like this:
|
@@ -60,7 +60,7 @@ Here is a nice gif, that shows _frameit_ in action:
|
|
60
60
|
<h5 align="center">The <em>frameit</em> 2.0 update was kindly sponsored by <a href="https://mindnode.com/">MindNode</a>, seen in the screenshots above.</h5>
|
61
61
|
|
62
62
|
|
63
|
-
The first time that _frameit_ is executed the frames will be downloaded automatically. Originally the frames are coming from [Facebook frameset](
|
63
|
+
The first time that _frameit_ is executed the frames will be downloaded automatically. Originally the frames are coming from [Facebook frameset](https://design.facebook.com/toolsandresources/devices/) and they are kept on [this repo](https://github.com/fastlane/frameit-frames).
|
64
64
|
|
65
65
|
More information about this process and how to update the frames can be found [here](https://github.com/fastlane/fastlane/tree/master/frameit/frames_generator)
|
66
66
|
|
@@ -100,7 +100,7 @@ That's all you need to run your tests. If you want more control, here are some a
|
|
100
100
|
fastlane scan --workspace "Example.xcworkspace" --scheme "AppName" --device "iPhone 6" --clean
|
101
101
|
```
|
102
102
|
|
103
|
-
If you need to use a different Xcode install, use `
|
103
|
+
If you need to use a different Xcode install, use `[xcodes](https://docs.fastlane.tools/actions/xcodes)` or define `DEVELOPER_DIR`:
|
104
104
|
|
105
105
|
```no-highlight
|
106
106
|
DEVELOPER_DIR="/Applications/Xcode6.2.app" scan
|
@@ -694,7 +694,7 @@ In this case, default values for keywords, urls, name and release notes are used
|
|
694
694
|
|
695
695
|
[Starting March 20, 2019 Apple's App Store](https://developer.apple.com/news/?id=03202019a) requires 12.9-inch iPad Pro (3rd generation) screenshots additionally to the iPad Pro 2nd generation [screenshots](https://help.apple.com/app-store-connect/#/devd274dd925). As fastlane historically uses the screenshot dimensions to determine the "display family" of a screenshot, this poses a problem as both use the same dimensions and are recognized as the same device family.
|
696
696
|
|
697
|
-
To solve this a screenshot of a 12.9-inch iPad Pro (3rd generation) must contain either the string `iPad Pro (12.9-inch) (3rd generation)` or `ipadPro129` (Apple's internal naming of the display family for the 3rd generation iPad Pro) in its filename to be assigned the correct display family and to be uploaded to the correct screenshot slot in your app's metadata.
|
697
|
+
To solve this a screenshot of a 12.9-inch iPad Pro (3rd generation) must contain either the string `iPad Pro (12.9-inch) (3rd generation)`, `IPAD_PRO_3GEN_129`, or `ipadPro129` (Apple's internal naming of the display family for the 3rd generation iPad Pro) in its filename to be assigned the correct display family and to be uploaded to the correct screenshot slot in your app's metadata.
|
698
698
|
|
699
699
|
## Automatically create screenshots
|
700
700
|
|