fastlane_hotfix 2.165.1 → 2.187.0
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 +106 -86
- data/cert/lib/cert/commands_generator.rb +2 -1
- data/cert/lib/cert/options.rb +6 -5
- data/cert/lib/cert/runner.rb +8 -8
- data/deliver/lib/assets/summary.html.erb +10 -10
- data/deliver/lib/deliver/app_screenshot.rb +17 -11
- data/deliver/lib/deliver/app_screenshot_validator.rb +108 -0
- data/deliver/lib/deliver/commands_generator.rb +4 -3
- data/deliver/lib/deliver/detect_values.rb +5 -3
- data/deliver/lib/deliver/download_screenshots.rb +2 -3
- data/deliver/lib/deliver/html_generator.rb +2 -2
- data/deliver/lib/deliver/languages.rb +1 -1
- data/deliver/lib/deliver/loader.rb +123 -21
- data/deliver/lib/deliver/module.rb +6 -0
- data/deliver/lib/deliver/options.rb +41 -55
- data/deliver/lib/deliver/runner.rb +19 -14
- data/deliver/lib/deliver/setup.rb +9 -5
- data/deliver/lib/deliver/submit_for_review.rb +4 -4
- data/deliver/lib/deliver/upload_metadata.rb +32 -21
- data/deliver/lib/deliver/upload_price_tier.rb +1 -1
- data/deliver/lib/deliver/upload_screenshots.rb +14 -76
- data/fastlane/lib/fastlane/actions/actions_helper.rb +3 -3
- data/fastlane/lib/fastlane/actions/adb.rb +2 -5
- data/fastlane/lib/fastlane/actions/adb_devices.rb +0 -1
- data/fastlane/lib/fastlane/actions/add_git_tag.rb +22 -6
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +17 -17
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +21 -7
- data/fastlane/lib/fastlane/actions/appaloosa.rb +7 -2
- data/fastlane/lib/fastlane/actions/appetize.rb +13 -8
- data/fastlane/lib/fastlane/actions/appetize_viewing_url_generator.rb +0 -11
- data/fastlane/lib/fastlane/actions/appium.rb +40 -65
- data/fastlane/lib/fastlane/actions/appledoc.rb +46 -46
- data/fastlane/lib/fastlane/actions/apteligent.rb +3 -2
- data/fastlane/lib/fastlane/actions/artifactory.rb +41 -9
- data/fastlane/lib/fastlane/actions/automatic_code_signing.rb +7 -13
- data/fastlane/lib/fastlane/actions/backup_file.rb +1 -1
- data/fastlane/lib/fastlane/actions/backup_xcarchive.rb +3 -3
- data/fastlane/lib/fastlane/actions/badge.rb +9 -13
- data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +11 -5
- data/fastlane/lib/fastlane/actions/build_app.rb +7 -1
- data/fastlane/lib/fastlane/actions/bundle_install.rb +8 -10
- data/fastlane/lib/fastlane/actions/carthage.rb +22 -14
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +8 -17
- data/fastlane/lib/fastlane/actions/chatwork.rb +3 -2
- data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +9 -1
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +0 -1
- data/fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb +0 -1
- data/fastlane/lib/fastlane/actions/clipboard.rb +3 -6
- data/fastlane/lib/fastlane/actions/cloc.rb +9 -13
- data/fastlane/lib/fastlane/actions/cocoapods.rb +23 -15
- data/fastlane/lib/fastlane/actions/commit_github_file.rb +12 -4
- data/fastlane/lib/fastlane/actions/commit_version_bump.rb +6 -7
- data/fastlane/lib/fastlane/actions/copy_artifacts.rb +3 -4
- data/fastlane/lib/fastlane/actions/crashlytics.rb +7 -11
- data/fastlane/lib/fastlane/actions/create_app_on_managed_play_store.rb +70 -76
- data/fastlane/lib/fastlane/actions/create_keychain.rb +13 -11
- data/fastlane/lib/fastlane/actions/create_pull_request.rb +15 -9
- data/fastlane/lib/fastlane/actions/create_xcframework.rb +123 -0
- data/fastlane/lib/fastlane/actions/danger.rb +13 -12
- data/fastlane/lib/fastlane/actions/deploygate.rb +1 -2
- data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +27 -28
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +7 -3
- data/fastlane/lib/fastlane/actions/docs/create_app_online.md +171 -67
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +20 -3
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +9 -3
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +39 -16
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +15 -5
- data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +142 -0
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +8 -20
- data/fastlane/lib/fastlane/actions/dsym_zip.rb +1 -1
- data/fastlane/lib/fastlane/actions/ensure_env_vars.rb +2 -6
- data/fastlane/lib/fastlane/actions/ensure_git_branch.rb +0 -1
- data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +3 -4
- data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +3 -5
- data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +1 -2
- data/fastlane/lib/fastlane/actions/environment_variable.rb +13 -21
- data/fastlane/lib/fastlane/actions/erb.rb +2 -5
- data/fastlane/lib/fastlane/actions/get_build_number_repository.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_certificates.rb +5 -1
- data/fastlane/lib/fastlane/actions/get_github_release.rb +11 -1
- data/fastlane/lib/fastlane/actions/get_ipa_info_plist_value.rb +0 -1
- data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +32 -35
- data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +9 -1
- data/fastlane/lib/fastlane/actions/get_push_certificate.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_version_number.rb +17 -10
- data/fastlane/lib/fastlane/actions/git_add.rb +5 -10
- data/fastlane/lib/fastlane/actions/git_branch.rb +4 -10
- data/fastlane/lib/fastlane/actions/git_commit.rb +12 -10
- data/fastlane/lib/fastlane/actions/git_pull.rb +4 -10
- data/fastlane/lib/fastlane/actions/git_remote_branch.rb +57 -0
- data/fastlane/lib/fastlane/actions/git_submodule_update.rb +16 -8
- data/fastlane/lib/fastlane/actions/git_tag_exists.rb +4 -0
- data/fastlane/lib/fastlane/actions/github_api.rb +17 -8
- data/fastlane/lib/fastlane/actions/gradle.rb +12 -20
- data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +1 -1
- data/fastlane/lib/fastlane/actions/hg_push.rb +1 -1
- data/fastlane/lib/fastlane/actions/hipchat.rb +6 -6
- data/fastlane/lib/fastlane/actions/hockey.rb +5 -12
- data/fastlane/lib/fastlane/actions/ifttt.rb +3 -6
- data/fastlane/lib/fastlane/actions/import_from_git.rb +7 -9
- data/fastlane/lib/fastlane/actions/increment_build_number.rb +8 -2
- data/fastlane/lib/fastlane/actions/install_on_device.rb +3 -6
- data/fastlane/lib/fastlane/actions/install_provisioning_profile.rb +4 -0
- data/fastlane/lib/fastlane/actions/installr.rb +22 -25
- data/fastlane/lib/fastlane/actions/ipa.rb +2 -2
- data/fastlane/lib/fastlane/actions/jazzy.rb +11 -8
- data/fastlane/lib/fastlane/actions/jira.rb +61 -14
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +6 -6
- data/fastlane/lib/fastlane/actions/lcov.rb +0 -4
- data/fastlane/lib/fastlane/actions/mailgun.rb +21 -27
- data/fastlane/lib/fastlane/actions/make_changelog_from_jenkins.rb +1 -1
- data/fastlane/lib/fastlane/actions/match_nuke.rb +59 -0
- data/fastlane/lib/fastlane/actions/modify_services.rb +59 -24
- data/fastlane/lib/fastlane/actions/nexus_upload.rb +3 -2
- data/fastlane/lib/fastlane/actions/notarize.rb +98 -54
- data/fastlane/lib/fastlane/actions/notification.rb +1 -1
- data/fastlane/lib/fastlane/actions/number_of_commits.rb +1 -1
- data/fastlane/lib/fastlane/actions/oclint.rb +15 -14
- data/fastlane/lib/fastlane/actions/onesignal.rb +13 -3
- data/fastlane/lib/fastlane/actions/pod_push.rb +9 -2
- data/fastlane/lib/fastlane/actions/podio_item.rb +0 -7
- data/fastlane/lib/fastlane/actions/prompt.rb +3 -4
- data/fastlane/lib/fastlane/actions/push_git_tags.rb +1 -1
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +14 -3
- data/fastlane/lib/fastlane/actions/puts.rb +1 -2
- data/fastlane/lib/fastlane/actions/register_device.rb +10 -13
- data/fastlane/lib/fastlane/actions/register_devices.rb +11 -14
- data/fastlane/lib/fastlane/actions/reset_git_repo.rb +5 -8
- data/fastlane/lib/fastlane/actions/reset_simulator_contents.rb +0 -2
- data/fastlane/lib/fastlane/actions/resign.rb +2 -9
- data/fastlane/lib/fastlane/actions/restore_file.rb +1 -1
- data/fastlane/lib/fastlane/actions/rsync.rb +3 -6
- data/fastlane/lib/fastlane/actions/run_tests.rb +1 -1
- data/fastlane/lib/fastlane/actions/s3.rb +1 -1
- data/fastlane/lib/fastlane/actions/say.rb +2 -3
- data/fastlane/lib/fastlane/actions/scp.rb +4 -10
- data/fastlane/lib/fastlane/actions/set_build_number_repository.rb +1 -1
- data/fastlane/lib/fastlane/actions/set_changelog.rb +10 -13
- data/fastlane/lib/fastlane/actions/set_github_release.rb +23 -16
- data/fastlane/lib/fastlane/actions/set_info_plist_value.rb +1 -1
- data/fastlane/lib/fastlane/actions/set_pod_key.rb +3 -4
- data/fastlane/lib/fastlane/actions/setup_ci.rb +1 -2
- data/fastlane/lib/fastlane/actions/setup_circle_ci.rb +1 -1
- data/fastlane/lib/fastlane/actions/setup_jenkins.rb +7 -12
- data/fastlane/lib/fastlane/actions/setup_travis.rb +1 -1
- data/fastlane/lib/fastlane/actions/sh.rb +2 -4
- data/fastlane/lib/fastlane/actions/slack.rb +164 -145
- data/fastlane/lib/fastlane/actions/slather.rb +5 -21
- data/fastlane/lib/fastlane/actions/sonar.rb +12 -19
- data/fastlane/lib/fastlane/actions/sourcedocs.rb +128 -0
- data/fastlane/lib/fastlane/actions/spaceship_logs.rb +1 -1
- data/fastlane/lib/fastlane/actions/splunkmint.rb +2 -2
- data/fastlane/lib/fastlane/actions/spm.rb +8 -2
- data/fastlane/lib/fastlane/actions/ssh.rb +5 -10
- data/fastlane/lib/fastlane/actions/swiftlint.rb +21 -19
- data/fastlane/lib/fastlane/actions/sync_code_signing.rb +6 -1
- data/fastlane/lib/fastlane/actions/testfairy.rb +0 -1
- data/fastlane/lib/fastlane/actions/tryouts.rb +2 -3
- data/fastlane/lib/fastlane/actions/twitter.rb +0 -5
- data/fastlane/lib/fastlane/actions/unlock_keychain.rb +3 -3
- data/fastlane/lib/fastlane/actions/update_app_group_identifiers.rb +1 -4
- data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +8 -15
- data/fastlane/lib/fastlane/actions/update_fastlane.rb +31 -10
- data/fastlane/lib/fastlane/actions/update_icloud_container_identifiers.rb +1 -4
- data/fastlane/lib/fastlane/actions/update_info_plist.rb +1 -1
- data/fastlane/lib/fastlane/actions/update_keychain_access_groups.rb +1 -4
- data/fastlane/lib/fastlane/actions/update_plist.rb +1 -1
- data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +3 -4
- data/fastlane/lib/fastlane/actions/update_urban_airship_configuration.rb +0 -1
- data/fastlane/lib/fastlane/actions/update_url_schemes.rb +15 -26
- data/fastlane/lib/fastlane/actions/upload_app_privacy_details_to_app_store.rb +290 -0
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +8 -7
- data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +3 -10
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +8 -4
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +7 -2
- data/fastlane/lib/fastlane/actions/validate_play_store_json_key.rb +40 -44
- data/fastlane/lib/fastlane/actions/version_get_podspec.rb +1 -2
- data/fastlane/lib/fastlane/actions/xcode_install.rb +8 -5
- data/fastlane/lib/fastlane/actions/xcode_server_get_assets.rb +3 -3
- data/fastlane/lib/fastlane/actions/xcodebuild.rb +5 -5
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +6 -3
- data/fastlane/lib/fastlane/commands_generator.rb +2 -1
- data/fastlane/lib/fastlane/documentation/actions_list.rb +2 -2
- data/fastlane/lib/fastlane/documentation/docs_generator.rb +1 -1
- data/fastlane/lib/fastlane/documentation/markdown_docs_generator.rb +1 -1
- data/fastlane/lib/fastlane/environment_printer.rb +1 -0
- data/fastlane/lib/fastlane/erb_template_helper.rb +7 -1
- data/fastlane/lib/fastlane/fast_file.rb +19 -7
- data/fastlane/lib/fastlane/fastlane_require.rb +7 -1
- data/fastlane/lib/fastlane/features.rb +1 -1
- data/fastlane/lib/fastlane/helper/adb_helper.rb +1 -1
- data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +4 -4
- data/fastlane/lib/fastlane/helper/gem_helper.rb +2 -2
- data/fastlane/lib/fastlane/helper/git_helper.rb +34 -5
- data/fastlane/lib/fastlane/lane_manager.rb +3 -2
- data/fastlane/lib/fastlane/notification/slack.rb +56 -0
- data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +1 -2
- data/fastlane/lib/fastlane/plugins/plugin_info.rb +2 -2
- data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +1 -2
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +2 -3
- data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +7 -6
- data/fastlane/lib/fastlane/plugins/template/.circleci/config.yml +1 -1
- data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +1 -1
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +31 -35
- data/fastlane/lib/fastlane/plugins/template/spec/spec_helper.rb.erb +1 -1
- data/fastlane/lib/fastlane/setup/setup.rb +23 -10
- data/fastlane/lib/fastlane/setup/setup_ios.rb +3 -3
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +3 -0
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +44 -16
- data/fastlane/lib/fastlane/swift_runner_upgrader.rb +2 -0
- data/fastlane/lib/fastlane/version.rb +2 -2
- data/fastlane/swift/Actions.swift +1 -1
- data/fastlane/swift/Appfile.swift +1 -1
- data/fastlane/swift/ArgumentProcessor.swift +1 -1
- data/fastlane/swift/ControlCommand.swift +1 -1
- data/fastlane/swift/Deliverfile.swift +2 -2
- data/fastlane/swift/DeliverfileProtocol.swift +23 -23
- data/fastlane/swift/Fastfile.swift +1 -1
- data/fastlane/swift/Fastlane.swift +7965 -4213
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +4 -0
- data/fastlane/swift/Gymfile.swift +2 -2
- data/fastlane/swift/GymfileProtocol.swift +15 -3
- data/fastlane/swift/LaneFileProtocol.swift +12 -6
- data/fastlane/swift/MainProcess.swift +3 -1
- data/fastlane/swift/Matchfile.swift +2 -2
- data/fastlane/swift/MatchfileProtocol.swift +4 -4
- data/fastlane/swift/OptionalConfigValue.swift +101 -0
- data/fastlane/swift/Plugins.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +2 -2
- data/fastlane/swift/PrecheckfileProtocol.swift +8 -4
- data/fastlane/swift/RubyCommand.swift +2 -2
- data/fastlane/swift/RubyCommandable.swift +1 -1
- data/fastlane/swift/Runner.swift +3 -3
- data/fastlane/swift/RunnerArgument.swift +1 -1
- data/fastlane/swift/Scanfile.swift +2 -2
- data/fastlane/swift/ScanfileProtocol.swift +34 -2
- data/fastlane/swift/Screengrabfile.swift +2 -2
- data/fastlane/swift/ScreengrabfileProtocol.swift +5 -5
- data/fastlane/swift/Snapshotfile.swift +2 -2
- data/fastlane/swift/SnapshotfileProtocol.swift +19 -3
- data/fastlane/swift/SocketClient.swift +4 -3
- data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
- data/fastlane/swift/SocketResponse.swift +5 -3
- data/fastlane/swift/formatting/Brewfile.lock.json +24 -16
- data/fastlane/swift/main.swift +1 -1
- data/fastlane/swift/upgrade_manifest.json +1 -1
- data/fastlane_core/lib/fastlane_core.rb +22 -20
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +89 -12
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +12 -7
- data/fastlane_core/lib/fastlane_core/clipboard.rb +20 -0
- data/fastlane_core/lib/fastlane_core/command_executor.rb +3 -9
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +6 -1
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +41 -3
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +14 -8
- data/fastlane_core/lib/fastlane_core/device_manager.rb +1 -1
- data/fastlane_core/lib/fastlane_core/helper.rb +78 -14
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +41 -16
- data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +3 -2
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +20 -15
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -1
- data/fastlane_core/lib/fastlane_core/languages.rb +2 -2
- data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +3 -2
- data/fastlane_core/lib/fastlane_core/print_table.rb +5 -3
- data/fastlane_core/lib/fastlane_core/project.rb +48 -28
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +3 -1
- data/{deliver/lib/deliver → fastlane_core/lib/fastlane_core}/queue_worker.rb +4 -4
- data/fastlane_core/lib/fastlane_core/swag.rb +1 -1
- data/fastlane_core/lib/fastlane_core/ui/disable_colors.rb +8 -0
- data/fastlane_core/lib/fastlane_core/ui/help.erb +35 -0
- data/fastlane_core/lib/fastlane_core/ui/help_formatter.rb +16 -0
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +16 -2
- data/fastlane_core/lib/fastlane_core/ui/interface.rb +1 -1
- data/fastlane_core/lib/fastlane_core/update_checker/update_checker.rb +2 -2
- data/frameit/lib/frameit/commands_generator.rb +2 -1
- data/frameit/lib/frameit/config_parser.rb +2 -2
- data/frameit/lib/frameit/device_types.rb +7 -1
- data/frameit/lib/frameit/frame_downloader.rb +2 -1
- data/gym/lib/gym/code_signing_mapping.rb +3 -3
- data/gym/lib/gym/commands_generator.rb +2 -1
- data/gym/lib/gym/error_handler.rb +8 -0
- data/gym/lib/gym/generators/build_command_generator.rb +3 -0
- data/gym/lib/gym/generators/package_command_generator.rb +4 -0
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +21 -15
- data/gym/lib/gym/options.rb +19 -3
- data/gym/lib/gym/runner.rb +15 -4
- data/match/lib/match/change_password.rb +3 -3
- data/match/lib/match/commands_generator.rb +2 -1
- data/match/lib/match/encryption/interface.rb +1 -1
- data/match/lib/match/encryption/openssl.rb +5 -3
- data/match/lib/match/importer.rb +9 -10
- data/match/lib/match/migrate.rb +2 -3
- data/match/lib/match/module.rb +2 -1
- data/match/lib/match/nuke.rb +19 -15
- data/match/lib/match/options.rb +4 -3
- data/match/lib/match/runner.rb +3 -4
- data/match/lib/match/spaceship_ensure.rb +3 -0
- data/match/lib/match/storage/git_storage.rb +14 -10
- data/match/lib/match/storage/google_cloud_storage.rb +2 -2
- data/match/lib/match/storage/s3_storage.rb +2 -2
- data/pem/lib/pem/commands_generator.rb +2 -1
- data/pilot/lib/pilot.rb +0 -1
- data/pilot/lib/pilot/build_manager.rb +41 -15
- data/pilot/lib/pilot/commands_generator.rb +2 -1
- data/pilot/lib/pilot/manager.rb +11 -8
- data/pilot/lib/pilot/options.rb +18 -9
- data/pilot/lib/pilot/tester_exporter.rb +0 -1
- data/pilot/lib/pilot/tester_manager.rb +0 -1
- data/precheck/lib/precheck/commands_generator.rb +2 -1
- data/precheck/lib/precheck/options.rb +9 -3
- data/precheck/lib/precheck/rule_processor.rb +1 -1
- data/precheck/lib/precheck/runner.rb +14 -9
- data/produce/lib/produce/commands_generator.rb +101 -28
- data/produce/lib/produce/developer_center.rb +42 -4
- data/produce/lib/produce/options.rb +1 -1
- data/produce/lib/produce/service.rb +270 -179
- data/scan/lib/scan/commands_generator.rb +2 -1
- data/scan/lib/scan/detect_values.rb +7 -2
- data/scan/lib/scan/module.rb +4 -0
- data/scan/lib/scan/options.rb +46 -1
- data/scan/lib/scan/runner.rb +88 -3
- data/scan/lib/scan/slack_poster.rb +4 -1
- data/scan/lib/scan/test_command_generator.rb +13 -8
- data/screengrab/lib/screengrab/android_environment.rb +5 -53
- data/screengrab/lib/screengrab/commands_generator.rb +2 -1
- data/screengrab/lib/screengrab/dependency_checker.rb +0 -20
- data/screengrab/lib/screengrab/options.rb +5 -2
- data/screengrab/lib/screengrab/runner.rb +111 -108
- data/sigh/lib/assets/resign.sh +81 -61
- data/sigh/lib/sigh/commands_generator.rb +2 -1
- data/sigh/lib/sigh/download_all.rb +4 -8
- data/sigh/lib/sigh/options.rb +3 -2
- data/sigh/lib/sigh/runner.rb +9 -9
- data/snapshot/lib/assets/SnapfileTemplate +3 -2
- data/snapshot/lib/assets/SnapfileTemplate.swift +2 -1
- data/snapshot/lib/assets/SnapshotHelper.swift +20 -12
- data/snapshot/lib/snapshot/commands_generator.rb +3 -1
- data/snapshot/lib/snapshot/options.rb +22 -2
- data/snapshot/lib/snapshot/reports_generator.rb +7 -1
- data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +1 -1
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +10 -5
- data/snapshot/lib/snapshot/test_command_generator.rb +18 -4
- data/snapshot/lib/snapshot/test_command_generator_base.rb +3 -1
- data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +1 -1
- data/snapshot/lib/snapshot/update.rb +1 -1
- data/spaceship/README.md +4 -14
- data/spaceship/lib/spaceship/base.rb +2 -2
- data/spaceship/lib/spaceship/client.rb +47 -29
- data/spaceship/lib/spaceship/commands_generator.rb +4 -2
- data/spaceship/lib/spaceship/connect_api.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/api_client.rb +67 -9
- data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +39 -6
- data/spaceship/lib/spaceship/connect_api/models/app.rb +95 -55
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage.rb +59 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_category.rb +65 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_data_protection.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_grouping.rb +18 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_purposes.rb +37 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usages_publish_state.rb +36 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +26 -10
- data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +8 -4
- data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +15 -11
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +18 -9
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +10 -8
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +20 -11
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_attachment.rb +7 -5
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +62 -38
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +27 -14
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_submission.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/beta_app_review_submission.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/beta_feedback.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +29 -3
- data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +15 -9
- data/spaceship/lib/spaceship/connect_api/models/build.rb +34 -17
- data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +41 -6
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +86 -21
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +12 -8
- data/spaceship/lib/spaceship/connect_api/models/device.rb +36 -4
- data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +18 -8
- data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb +9 -6
- data/spaceship/lib/spaceship/connect_api/models/territory.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/user.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +22 -6
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +99 -2
- data/spaceship/lib/spaceship/connect_api/response.rb +3 -1
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +50 -0
- data/spaceship/lib/spaceship/connect_api/token.rb +15 -3
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +122 -2
- data/spaceship/lib/spaceship/errors.rb +19 -0
- data/spaceship/lib/spaceship/playground.rb +2 -2
- data/spaceship/lib/spaceship/spaceauth_runner.rb +38 -15
- data/spaceship/lib/spaceship/tunes/iap_detail.rb +1 -1
- data/spaceship/lib/spaceship/tunes/members.rb +1 -1
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +4 -4
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +59 -33
- data/spaceship/lib/spaceship/ui.rb +2 -2
- data/spaceship/lib/spaceship/upgrade_2fa_later_client.rb +91 -0
- data/supply/lib/supply.rb +1 -1
- data/supply/lib/supply/client.rb +5 -3
- data/supply/lib/supply/commands_generator.rb +2 -1
- data/supply/lib/supply/options.rb +3 -3
- data/supply/lib/supply/uploader.rb +6 -4
- metadata +125 -93
- data/pilot/lib/pilot/features.rb +0 -0
- data/pilot/lib/pilot/tester_util.rb +0 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AppDataUsageDataProtection
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :deleted
|
8
|
+
|
9
|
+
attr_mapping({
|
10
|
+
"deleted" => "deleted"
|
11
|
+
})
|
12
|
+
|
13
|
+
# Found at https://appstoreconnect.apple.com/iris/v1/appDataUsageDataProtections
|
14
|
+
module ID
|
15
|
+
DATA_USED_TO_TRACK_YOU = "DATA_USED_TO_TRACK_YOU"
|
16
|
+
DATA_LINKED_TO_YOU = "DATA_LINKED_TO_YOU"
|
17
|
+
DATA_NOT_LINKED_TO_YOU = "DATA_NOT_LINKED_TO_YOU"
|
18
|
+
|
19
|
+
DATA_NOT_COLLECTED = "DATA_NOT_COLLECTED"
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.type
|
23
|
+
return "appDataUsageDataProtections"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AppDataUsageGrouping
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :deleted
|
8
|
+
|
9
|
+
attr_mapping({
|
10
|
+
"deleted" => "deleted"
|
11
|
+
})
|
12
|
+
|
13
|
+
def self.type
|
14
|
+
return "appDataUsageGroupings"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AppDataUsagePurpose
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :deleted
|
8
|
+
|
9
|
+
attr_mapping({
|
10
|
+
"deleted" => "deleted"
|
11
|
+
})
|
12
|
+
|
13
|
+
# Found at https://appstoreconnect.apple.com/iris/v1/appDataUsagePurposes
|
14
|
+
module ID
|
15
|
+
THIRD_PARTY_ADVERTISING = "THIRD_PARTY_ADVERTISING"
|
16
|
+
DEVELOPERS_ADVERTISING = "DEVELOPERS_ADVERTISING"
|
17
|
+
ANALYTICS = "ANALYTICS"
|
18
|
+
PRODUCT_PERSONALIZATION = "PRODUCT_PERSONALIZATION"
|
19
|
+
APP_FUNCTIONALITY = "APP_FUNCTIONALITY"
|
20
|
+
OTHER_PURPOSES = "OTHER_PURPOSES"
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.type
|
24
|
+
return "appDataUsagePurposes"
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# API
|
29
|
+
#
|
30
|
+
|
31
|
+
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
32
|
+
resps = Spaceship::ConnectAPI.get_app_data_usage_purposes(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
|
33
|
+
return resps.flat_map(&:to_models)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AppDataUsagesPublishState
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :published
|
8
|
+
attr_accessor :last_published
|
9
|
+
attr_accessor :last_published_by
|
10
|
+
|
11
|
+
attr_mapping({
|
12
|
+
"published" => "published",
|
13
|
+
"lastPublished" => "last_published",
|
14
|
+
"lastPublishedBy" => "last_published_by"
|
15
|
+
})
|
16
|
+
|
17
|
+
def self.type
|
18
|
+
return "appDataUsagesPublishState"
|
19
|
+
end
|
20
|
+
|
21
|
+
#
|
22
|
+
# API
|
23
|
+
#
|
24
|
+
|
25
|
+
def self.get(app_id: nil)
|
26
|
+
resp = Spaceship::ConnectAPI.get_app_data_usages_publish_state(app_id: app_id)
|
27
|
+
return resp.to_models.first
|
28
|
+
end
|
29
|
+
|
30
|
+
def publish!
|
31
|
+
resp = Spaceship::ConnectAPI.patch_app_data_usages_publish_state(app_data_usages_publish_state_id: id, published: true)
|
32
|
+
return resp.to_models.first
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -24,6 +24,7 @@ module Spaceship
|
|
24
24
|
IN_REVIEW = "IN_REVIEW"
|
25
25
|
WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
|
26
26
|
DEVELOPER_REJECTED = "DEVELOPER_REJECTED"
|
27
|
+
DEVELOPER_REMOVED_FROM_SALE = "DEVELOPER_REMOVED_FROM_SALE"
|
27
28
|
REJECTED = "REJECTED"
|
28
29
|
PREPARE_FOR_SUBMISSION = "PREPARE_FOR_SUBMISSION"
|
29
30
|
METADATA_REJECTED = "METADATA_REJECTED"
|
@@ -65,29 +66,44 @@ module Spaceship
|
|
65
66
|
# API
|
66
67
|
#
|
67
68
|
|
68
|
-
def update(filter: {}, includes: nil, limit: nil, sort: nil)
|
69
|
-
Spaceship::ConnectAPI
|
69
|
+
def update(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
70
|
+
client ||= Spaceship::ConnectAPI
|
71
|
+
client.patch_app_info(app_info_id: id).first
|
70
72
|
end
|
71
73
|
|
72
|
-
def update_categories(category_id_map: nil)
|
73
|
-
Spaceship::ConnectAPI
|
74
|
+
def update_categories(client: nil, category_id_map: nil)
|
75
|
+
client ||= Spaceship::ConnectAPI
|
76
|
+
client.patch_app_info_categories(app_info_id: id, category_id_map: category_id_map).first
|
74
77
|
end
|
75
78
|
|
76
|
-
def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
|
77
|
-
Spaceship::ConnectAPI
|
79
|
+
def delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
80
|
+
client ||= Spaceship::ConnectAPI
|
81
|
+
client.delete_app_info(app_info_id: id)
|
82
|
+
end
|
83
|
+
|
84
|
+
#
|
85
|
+
# Age Rating Declaration
|
86
|
+
#
|
87
|
+
|
88
|
+
def fetch_age_rating_declaration(client: nil)
|
89
|
+
client ||= Spaceship::ConnectAPI
|
90
|
+
resp = client.get_age_rating_declaration(app_info_id: id)
|
91
|
+
return resp.to_models.first
|
78
92
|
end
|
79
93
|
|
80
94
|
#
|
81
95
|
# App Info Localizations
|
82
96
|
#
|
83
97
|
|
84
|
-
def create_app_info_localization(attributes: nil)
|
85
|
-
|
98
|
+
def create_app_info_localization(client: nil, attributes: nil)
|
99
|
+
client ||= Spaceship::ConnectAPI
|
100
|
+
resp = client.post_app_info_localization(app_info_id: id, attributes: attributes)
|
86
101
|
return resp.to_models.first
|
87
102
|
end
|
88
103
|
|
89
|
-
def get_app_info_localizations(filter: {}, includes: nil, limit: nil, sort: nil)
|
90
|
-
|
104
|
+
def get_app_info_localizations(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
105
|
+
client ||= Spaceship::ConnectAPI
|
106
|
+
resp = client.get_app_info_localizations(app_info_id: id, filter: filter, includes: includes, limit: limit, sort: sort)
|
91
107
|
return resp.to_models
|
92
108
|
end
|
93
109
|
end
|
@@ -8,6 +8,7 @@ module Spaceship
|
|
8
8
|
attr_accessor :name
|
9
9
|
attr_accessor :subtitle
|
10
10
|
attr_accessor :privacy_policy_url
|
11
|
+
attr_accessor :privacy_choices_url
|
11
12
|
attr_accessor :privacy_policy_text
|
12
13
|
|
13
14
|
attr_mapping({
|
@@ -15,6 +16,7 @@ module Spaceship
|
|
15
16
|
"name" => "name",
|
16
17
|
"subtitle" => "subtitle",
|
17
18
|
"privacyPolicyUrl" => "privacy_policy_url",
|
19
|
+
"privacyChoicesUrl" => "privacy_choices_url",
|
18
20
|
"privacyPolicyText" => "privacy_policy_text"
|
19
21
|
})
|
20
22
|
|
@@ -26,13 +28,15 @@ module Spaceship
|
|
26
28
|
# API
|
27
29
|
#
|
28
30
|
|
29
|
-
def update(attributes: nil)
|
31
|
+
def update(client: nil, attributes: nil)
|
32
|
+
client ||= Spaceship::ConnectAPI
|
30
33
|
attributes = reverse_attr_mapping(attributes)
|
31
|
-
|
34
|
+
client.patch_app_info_localization(app_info_localization_id: id, attributes: attributes)
|
32
35
|
end
|
33
36
|
|
34
|
-
def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
|
35
|
-
Spaceship::ConnectAPI
|
37
|
+
def delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
38
|
+
client ||= Spaceship::ConnectAPI
|
39
|
+
client.delete_app_info_localization(app_info_localization_id: id)
|
36
40
|
end
|
37
41
|
end
|
38
42
|
end
|
@@ -45,8 +45,9 @@ module Spaceship
|
|
45
45
|
# API
|
46
46
|
#
|
47
47
|
|
48
|
-
def self.get(app_preview_id: nil)
|
49
|
-
Spaceship::ConnectAPI
|
48
|
+
def self.get(client: nil, app_preview_id: nil)
|
49
|
+
client ||= Spaceship::ConnectAPI
|
50
|
+
client.get_app_preview(app_preview_id: app_preview_id).first
|
50
51
|
end
|
51
52
|
|
52
53
|
# Creates an AppPreview in an AppPreviewSet
|
@@ -54,7 +55,8 @@ module Spaceship
|
|
54
55
|
# @param app_preview_set_id The AppPreviewSet id
|
55
56
|
# @param path The path of the file
|
56
57
|
# @param frame_time_code The time code for the preview still frame (ex: "00:00:07:01")
|
57
|
-
def self.create(app_preview_set_id: nil, path: nil, wait_for_processing: true, frame_time_code: nil)
|
58
|
+
def self.create(client: nil, app_preview_set_id: nil, path: nil, wait_for_processing: true, frame_time_code: nil)
|
59
|
+
client ||= Spaceship::ConnectAPI
|
58
60
|
require 'faraday'
|
59
61
|
|
60
62
|
filename = File.basename(path)
|
@@ -67,7 +69,7 @@ module Spaceship
|
|
67
69
|
}
|
68
70
|
|
69
71
|
# Create placeholder
|
70
|
-
preview =
|
72
|
+
preview = client.post_app_preview(
|
71
73
|
app_preview_set_id: app_preview_set_id,
|
72
74
|
attributes: post_attributes
|
73
75
|
).first
|
@@ -83,14 +85,14 @@ module Spaceship
|
|
83
85
|
}
|
84
86
|
|
85
87
|
begin
|
86
|
-
preview =
|
88
|
+
preview = client.patch_app_preview(
|
87
89
|
app_preview_id: preview.id,
|
88
90
|
attributes: patch_attributes
|
89
91
|
).first
|
90
92
|
rescue => error
|
91
93
|
puts("Failed to patch app preview. Update may have gone through so verifying") if Spaceship::Globals.verbose?
|
92
94
|
|
93
|
-
preview = Spaceship::ConnectAPI::AppPreview.get(app_preview_id: preview.id)
|
95
|
+
preview = Spaceship::ConnectAPI::AppPreview.get(client: client, app_preview_id: preview.id)
|
94
96
|
raise error unless preview.complete?
|
95
97
|
end
|
96
98
|
|
@@ -111,20 +113,22 @@ module Spaceship
|
|
111
113
|
puts("Waiting #{sleep_time} seconds before checking status of processing...") if Spaceship::Globals.verbose?
|
112
114
|
sleep(sleep_time)
|
113
115
|
|
114
|
-
preview = Spaceship::ConnectAPI::AppPreview.get(app_preview_id: preview.id)
|
116
|
+
preview = Spaceship::ConnectAPI::AppPreview.get(client: client, app_preview_id: preview.id)
|
115
117
|
end
|
116
118
|
end
|
117
119
|
|
118
120
|
preview
|
119
121
|
end
|
120
122
|
|
121
|
-
def update(attributes: nil)
|
123
|
+
def update(client: nil, attributes: nil)
|
124
|
+
client ||= Spaceship::ConnectAPI
|
122
125
|
attributes = reverse_attr_mapping(attributes)
|
123
|
-
|
126
|
+
client.patch_app_preview(app_preview_id: id, attributes: attributes).first
|
124
127
|
end
|
125
128
|
|
126
|
-
def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
|
127
|
-
Spaceship::ConnectAPI
|
129
|
+
def delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
130
|
+
client ||= Spaceship::ConnectAPI
|
131
|
+
client.delete_app_preview(app_preview_id: id)
|
128
132
|
end
|
129
133
|
end
|
130
134
|
end
|
@@ -58,18 +58,26 @@ module Spaceship
|
|
58
58
|
# API
|
59
59
|
#
|
60
60
|
|
61
|
-
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
62
|
-
|
61
|
+
def self.all(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
62
|
+
client ||= Spaceship::ConnectAPI
|
63
|
+
resp = client.get_app_preview_sets(filter: filter, includes: includes, limit: limit, sort: sort)
|
63
64
|
return resp.to_models
|
64
65
|
end
|
65
66
|
|
66
|
-
def self.get(app_preview_set_id: nil, includes: "appPreviews")
|
67
|
-
|
67
|
+
def self.get(client: nil, app_preview_set_id: nil, includes: "appPreviews")
|
68
|
+
client ||= Spaceship::ConnectAPI
|
69
|
+
return client.get_app_preview_set(app_preview_set_id: app_preview_set_id, filter: nil, includes: includes, limit: nil, sort: nil).first
|
68
70
|
end
|
69
71
|
|
70
|
-
def
|
72
|
+
def delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
73
|
+
client ||= Spaceship::ConnectAPI
|
74
|
+
return client.delete_app_preview_set(app_preview_set_id: id)
|
75
|
+
end
|
76
|
+
|
77
|
+
def upload_preview(client: nil, path: nil, wait_for_processing: true, position: nil, frame_time_code: nil)
|
78
|
+
client ||= Spaceship::ConnectAPI
|
71
79
|
# Upload preview
|
72
|
-
preview = Spaceship::ConnectAPI::AppPreview.create(app_preview_set_id: id, path: path, wait_for_processing: wait_for_processing, frame_time_code: frame_time_code)
|
80
|
+
preview = Spaceship::ConnectAPI::AppPreview.create(client: client, app_preview_set_id: id, path: path, wait_for_processing: wait_for_processing, frame_time_code: frame_time_code)
|
73
81
|
|
74
82
|
# Reposition (if specified)
|
75
83
|
unless position.nil?
|
@@ -90,10 +98,11 @@ module Spaceship
|
|
90
98
|
return preview
|
91
99
|
end
|
92
100
|
|
93
|
-
def reorder_previews(app_preview_ids: nil)
|
94
|
-
Spaceship::ConnectAPI
|
101
|
+
def reorder_previews(client: nil, app_preview_ids: nil)
|
102
|
+
client ||= Spaceship::ConnectAPI
|
103
|
+
client.patch_app_preview_set_previews(app_preview_set_id: id, app_preview_ids: app_preview_ids)
|
95
104
|
|
96
|
-
return
|
105
|
+
return client.get_app_preview_set(app_preview_set_id: id, includes: "appPreviews").first
|
97
106
|
end
|
98
107
|
end
|
99
108
|
end
|
@@ -79,7 +79,8 @@ module Spaceship
|
|
79
79
|
#
|
80
80
|
#
|
81
81
|
|
82
|
-
def self.create(app_screenshot_set_id: nil, path: nil, wait_for_processing: true)
|
82
|
+
def self.create(client: nil, app_screenshot_set_id: nil, path: nil, wait_for_processing: true)
|
83
|
+
client ||= Spaceship::ConnectAPI
|
83
84
|
require 'faraday'
|
84
85
|
|
85
86
|
filename = File.basename(path)
|
@@ -93,7 +94,7 @@ module Spaceship
|
|
93
94
|
|
94
95
|
# Create placeholder to upload screenshot
|
95
96
|
begin
|
96
|
-
screenshot =
|
97
|
+
screenshot = client.post_app_screenshot(
|
97
98
|
app_screenshot_set_id: app_screenshot_set_id,
|
98
99
|
attributes: post_attributes
|
99
100
|
).first
|
@@ -111,13 +112,13 @@ module Spaceship
|
|
111
112
|
timeout_minutes = (ENV["SPACESHIP_SCREENSHOT_UPLOAD_TIMEOUT"] || 20).to_i
|
112
113
|
|
113
114
|
loop do
|
114
|
-
# This error handling needs to be revised since any error
|
115
|
+
# This error handling needs to be revised since any error occurred can reach here.
|
115
116
|
# It should handle errors based on what status code is.
|
116
117
|
puts("Waiting for screenshots to appear before uploading. This is unlikely to be recovered unless it's 503 error. error=\"#{error}\"")
|
117
118
|
sleep(30)
|
118
119
|
|
119
120
|
screenshots = Spaceship::ConnectAPI::AppScreenshotSet
|
120
|
-
.get(app_screenshot_set_id: app_screenshot_set_id)
|
121
|
+
.get(client: client, app_screenshot_set_id: app_screenshot_set_id)
|
121
122
|
.app_screenshots
|
122
123
|
|
123
124
|
screenshot = screenshots.find do |s|
|
@@ -152,7 +153,7 @@ module Spaceship
|
|
152
153
|
rescue => error
|
153
154
|
puts("Failed to patch app screenshot. Update may have gone through so verifying") if Spaceship::Globals.verbose?
|
154
155
|
|
155
|
-
screenshot =
|
156
|
+
screenshot = client.get_app_screenshot(app_screenshot_id: screenshot.id).first
|
156
157
|
raise error unless screenshot.complete?
|
157
158
|
end
|
158
159
|
|
@@ -172,15 +173,16 @@ module Spaceship
|
|
172
173
|
puts("Waiting #{sleep_time} seconds before checking status of processing...") if Spaceship::Globals.verbose?
|
173
174
|
sleep(sleep_time)
|
174
175
|
|
175
|
-
screenshot =
|
176
|
+
screenshot = client.get_app_screenshot(app_screenshot_id: screenshot.id).first
|
176
177
|
end
|
177
178
|
end
|
178
179
|
|
179
180
|
return screenshot
|
180
181
|
end
|
181
182
|
|
182
|
-
def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
|
183
|
-
Spaceship::ConnectAPI
|
183
|
+
def delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
184
|
+
client ||= Spaceship::ConnectAPI
|
185
|
+
client.delete_app_screenshot(app_screenshot_id: id)
|
184
186
|
end
|
185
187
|
end
|
186
188
|
end
|
@@ -112,22 +112,30 @@ module Spaceship
|
|
112
112
|
# API
|
113
113
|
#
|
114
114
|
|
115
|
-
def self.all(app_store_version_localization_id: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
116
|
-
|
115
|
+
def self.all(client: nil, app_store_version_localization_id: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
116
|
+
client ||= Spaceship::ConnectAPI
|
117
|
+
resp = client.get_app_screenshot_sets(app_store_version_localization_id: app_store_version_localization_id, filter: filter, includes: includes, limit: limit, sort: sort)
|
117
118
|
return resp.to_models
|
118
119
|
end
|
119
120
|
|
120
|
-
def self.get(app_screenshot_set_id: nil, includes: "appScreenshots")
|
121
|
-
|
121
|
+
def self.get(client: nil, app_screenshot_set_id: nil, includes: "appScreenshots")
|
122
|
+
client ||= Spaceship::ConnectAPI
|
123
|
+
return client.get_app_screenshot_set(app_screenshot_set_id: app_screenshot_set_id, filter: nil, includes: includes, limit: nil, sort: nil).first
|
122
124
|
end
|
123
125
|
|
124
|
-
def
|
125
|
-
|
126
|
+
def delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
127
|
+
client ||= Spaceship::ConnectAPI
|
128
|
+
return client.delete_app_screenshot_set(app_screenshot_set_id: id)
|
129
|
+
end
|
130
|
+
|
131
|
+
def upload_screenshot(client: nil, path: nil, wait_for_processing: true, position: nil)
|
132
|
+
client ||= Spaceship::ConnectAPI
|
133
|
+
screenshot = Spaceship::ConnectAPI::AppScreenshot.create(client: client, app_screenshot_set_id: id, path: path, wait_for_processing: wait_for_processing)
|
126
134
|
|
127
135
|
# Reposition (if specified)
|
128
136
|
unless position.nil?
|
129
137
|
# Get all app preview ids
|
130
|
-
set = AppScreenshotSet.get(app_screenshot_set_id: id)
|
138
|
+
set = AppScreenshotSet.get(client: client, app_screenshot_set_id: id)
|
131
139
|
app_screenshot_ids = set.app_screenshots.map(&:id)
|
132
140
|
|
133
141
|
# Remove new uploaded screenshot
|
@@ -137,16 +145,17 @@ module Spaceship
|
|
137
145
|
app_screenshot_ids = app_screenshot_ids.insert(position, screenshot.id).compact
|
138
146
|
|
139
147
|
# Reorder screenshots
|
140
|
-
reorder_screenshots(app_screenshot_ids: app_screenshot_ids)
|
148
|
+
reorder_screenshots(client: client, app_screenshot_ids: app_screenshot_ids)
|
141
149
|
end
|
142
150
|
|
143
151
|
return screenshot
|
144
152
|
end
|
145
153
|
|
146
|
-
def reorder_screenshots(app_screenshot_ids: nil)
|
147
|
-
Spaceship::ConnectAPI
|
154
|
+
def reorder_screenshots(client: nil, app_screenshot_ids: nil)
|
155
|
+
client ||= Spaceship::ConnectAPI
|
156
|
+
client.patch_app_screenshot_set_screenshots(app_screenshot_set_id: id, app_screenshot_ids: app_screenshot_ids)
|
148
157
|
|
149
|
-
return
|
158
|
+
return client.get_app_screenshot_set(app_screenshot_set_id: id, includes: "appScreenshots").first
|
150
159
|
end
|
151
160
|
end
|
152
161
|
end
|