fastlane 2.173.0 → 2.194.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 +105 -85
- data/cert/lib/cert/commands_generator.rb +2 -1
- data/cert/lib/cert/options.rb +4 -3
- data/cert/lib/cert/runner.rb +7 -7
- data/deliver/lib/assets/summary.html.erb +10 -10
- data/deliver/lib/deliver/app_screenshot.rb +8 -3
- data/deliver/lib/deliver/app_screenshot_iterator.rb +2 -2
- data/deliver/lib/deliver/commands_generator.rb +3 -2
- 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 +1 -1
- data/deliver/lib/deliver/module.rb +6 -0
- data/deliver/lib/deliver/options.rb +48 -56
- data/deliver/lib/deliver/runner.rb +28 -15
- data/deliver/lib/deliver/screenshot_comparable.rb +62 -0
- data/deliver/lib/deliver/setup.rb +1 -2
- data/deliver/lib/deliver/submit_for_review.rb +4 -4
- data/deliver/lib/deliver/sync_screenshots.rb +200 -0
- data/deliver/lib/deliver/upload_metadata.rb +26 -11
- data/deliver/lib/deliver/upload_price_tier.rb +1 -1
- data/deliver/lib/deliver/upload_screenshots.rb +13 -12
- data/fastlane/lib/assets/completions/completion.bash +4 -1
- data/fastlane/lib/assets/completions/completion.zsh +6 -5
- data/{spaceship/lib/spaceship/connect_api/models/.app_store_version_submission.rb.swp → fastlane/lib/fastlane/actions/.notarize.rb.swp} +0 -0
- data/fastlane/lib/fastlane/actions/actions_helper.rb +2 -2
- 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 +4 -4
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +18 -18
- 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 +45 -45
- data/fastlane/lib/fastlane/actions/apteligent.rb +3 -2
- data/fastlane/lib/fastlane/actions/artifactory.rb +5 -6
- 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 +4 -0
- data/fastlane/lib/fastlane/actions/bundle_install.rb +21 -11
- 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 +25 -2
- 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 +0 -9
- data/fastlane/lib/fastlane/actions/create_xcframework.rb +102 -17
- 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 +29 -30
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +3 -3
- data/fastlane/lib/fastlane/actions/docs/create_app_online.md +171 -67
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +19 -2
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +8 -2
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +37 -18
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +10 -4
- data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +1 -1
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +8 -19
- 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 +10 -2
- 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 +6 -8
- 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 +4 -6
- data/fastlane/lib/fastlane/actions/gradle.rb +13 -21
- 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 +7 -7
- 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 +2 -2
- data/fastlane/lib/fastlane/actions/notarize.rb +181 -52
- 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/pod_push.rb +0 -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 +2 -2
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +6 -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 +10 -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 +11 -14
- data/fastlane/lib/fastlane/actions/set_github_release.rb +2 -8
- 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 +161 -141
- data/fastlane/lib/fastlane/actions/slather.rb +9 -19
- 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 +3 -3
- data/fastlane/lib/fastlane/actions/ssh.rb +5 -10
- data/fastlane/lib/fastlane/actions/swiftlint.rb +18 -16
- data/fastlane/lib/fastlane/actions/sync_code_signing.rb +7 -2
- 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 +2 -2
- 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 +1 -2
- 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 +5 -1
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +10 -3
- 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_server_get_assets.rb +3 -3
- data/fastlane/lib/fastlane/actions/xcodebuild.rb +5 -5
- data/fastlane/lib/fastlane/actions/zip.rb +86 -21
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +1 -1
- 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 +12 -6
- 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 +3 -0
- 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 +30 -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_function.rb +43 -15
- 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 +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +27 -23
- data/fastlane/swift/Fastlane.swift +7993 -4352
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +4 -0
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/LaneFileProtocol.swift +10 -4
- data/fastlane/swift/MainProcess.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +3 -3
- data/fastlane/swift/OptionalConfigValue.swift +101 -0
- data/fastlane/swift/Plugins.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +4 -4
- data/fastlane/swift/RubyCommand.swift +2 -2
- data/fastlane/swift/RubyCommandable.swift +1 -1
- data/fastlane/swift/Runner.swift +2 -2
- data/fastlane/swift/RunnerArgument.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +17 -1
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +4 -4
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +5 -1
- data/fastlane/swift/SocketClient.swift +3 -2
- data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
- data/fastlane/swift/SocketResponse.swift +5 -3
- data/fastlane/swift/formatting/Brewfile.lock.json +37 -21
- data/fastlane/swift/main.swift +1 -1
- data/fastlane/swift/upgrade_manifest.json +1 -1
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +113 -17
- 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 +66 -10
- data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +3 -2
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +14 -8
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +12 -5
- data/fastlane_core/lib/fastlane_core/languages.rb +2 -2
- data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +5 -0
- 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 +30 -23
- 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 +1 -0
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +41 -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/fastlane_core/lib/fastlane_core.rb +22 -20
- data/frameit/lib/frameit/commands_generator.rb +2 -1
- data/frameit/lib/frameit/config_parser.rb +2 -2
- data/frameit/lib/frameit/frame_downloader.rb +2 -1
- data/gym/lib/gym/code_signing_mapping.rb +2 -2
- data/gym/lib/gym/commands_generator.rb +2 -1
- data/gym/lib/gym/generators/package_command_generator.rb +4 -0
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +19 -13
- 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 +2 -2
- data/match/lib/match/importer.rb +9 -10
- data/match/lib/match/migrate.rb +2 -3
- data/match/lib/match/module.rb +1 -0
- data/match/lib/match/nuke.rb +10 -10
- data/match/lib/match/options.rb +5 -4
- data/match/lib/match/runner.rb +12 -12
- data/match/lib/match/spaceship_ensure.rb +3 -0
- 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/build_manager.rb +45 -15
- data/pilot/lib/pilot/commands_generator.rb +2 -1
- data/pilot/lib/pilot/manager.rb +14 -9
- data/pilot/lib/pilot/options.rb +39 -11
- data/pilot/lib/pilot/tester_exporter.rb +0 -1
- data/pilot/lib/pilot/tester_manager.rb +0 -1
- data/pilot/lib/pilot.rb +0 -1
- data/precheck/lib/precheck/commands_generator.rb +2 -1
- data/precheck/lib/precheck/module.rb +2 -0
- data/precheck/lib/precheck/options.rb +7 -6
- data/precheck/lib/precheck/runner.rb +13 -8
- data/produce/lib/produce/commands_generator.rb +129 -28
- data/produce/lib/produce/developer_center.rb +42 -4
- data/produce/lib/produce/options.rb +1 -1
- data/produce/lib/produce/service.rb +285 -179
- data/scan/lib/scan/commands_generator.rb +2 -1
- data/scan/lib/scan/detect_values.rb +26 -14
- data/scan/lib/scan/module.rb +1 -0
- data/scan/lib/scan/options.rb +32 -6
- data/scan/lib/scan/runner.rb +81 -1
- data/scan/lib/scan/test_command_generator.rb +37 -12
- data/scan/lib/scan/xcpretty_reporter_options_generator.rb +1 -1
- 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 +110 -109
- 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 +6 -4
- data/sigh/lib/sigh/runner.rb +8 -8
- data/snapshot/lib/assets/SnapfileTemplate +3 -2
- data/snapshot/lib/assets/SnapfileTemplate.swift +2 -1
- data/snapshot/lib/assets/SnapshotHelper.swift +14 -10
- data/snapshot/lib/snapshot/commands_generator.rb +3 -1
- data/snapshot/lib/snapshot/options.rb +5 -0
- 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 +12 -6
- data/snapshot/lib/snapshot/test_command_generator.rb +17 -3
- data/spaceship/README.md +4 -14
- data/spaceship/lib/spaceship/base.rb +2 -2
- data/spaceship/lib/spaceship/client.rb +37 -20
- data/spaceship/lib/spaceship/commands_generator.rb +4 -2
- data/spaceship/lib/spaceship/connect_api/api_client.rb +80 -8
- data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +36 -4
- data/spaceship/lib/spaceship/connect_api/models/app.rb +10 -2
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +10 -0
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +2 -3
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +8 -1
- data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +3 -1
- data/spaceship/lib/spaceship/connect_api/models/build.rb +14 -1
- data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +8 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +32 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +84 -21
- data/spaceship/lib/spaceship/connect_api/models/capabilities.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/models/user.rb +17 -3
- data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +37 -3
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +104 -2
- data/spaceship/lib/spaceship/connect_api/testflight/client.rb +3 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +72 -5
- data/spaceship/lib/spaceship/connect_api/token.rb +19 -4
- data/spaceship/lib/spaceship/connect_api/tunes/client.rb +3 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +19 -2
- data/spaceship/lib/spaceship/connect_api/users/client.rb +3 -0
- data/spaceship/lib/spaceship/connect_api/users/users.rb +58 -3
- data/spaceship/lib/spaceship/connect_api.rb +1 -0
- data/spaceship/lib/spaceship/playground.rb +2 -2
- data/spaceship/lib/spaceship/spaceauth_runner.rb +38 -15
- data/spaceship/lib/spaceship/tunes/members.rb +1 -1
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +5 -2
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +42 -29
- data/spaceship/lib/spaceship/ui.rb +2 -2
- data/supply/lib/supply/client.rb +45 -4
- data/supply/lib/supply/commands_generator.rb +2 -1
- data/supply/lib/supply/options.rb +14 -2
- data/supply/lib/supply/uploader.rb +13 -9
- metadata +119 -98
- data/fastlane/lib/fastlane/.erb_template_helper.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.git_commit.rb.swp +0 -0
- data/pilot/lib/pilot/features.rb +0 -0
- data/pilot/lib/pilot/tester_util.rb +0 -0
- data/spaceship/lib/spaceship/.DS_Store +0 -0
data/spaceship/README.md
CHANGED
@@ -83,7 +83,7 @@ Using spaceship, the execution time of [_sigh_](https://docs.fastlane.tools/acti
|
|
83
83
|
|
84
84
|
_spaceship_ is part of _fastlane_:
|
85
85
|
|
86
|
-
|
86
|
+
gem install fastlane
|
87
87
|
|
88
88
|
# Usage
|
89
89
|
|
@@ -93,7 +93,7 @@ To try _spaceship_, just run `fastlane spaceship`. It will automatically start t
|
|
93
93
|
|
94
94
|
![assets/docs/Playground.png](assets/docs/Playground.png)
|
95
95
|
|
96
|
-
This requires you to install `pry` using `
|
96
|
+
This requires you to install `pry` using `gem install pry`. `pry` is not installed by default, as most [_fastlane_](https://fastlane.tools) users won't need the `spaceship playground`. You can add the `pry` dependency to your `Gemfile`.
|
97
97
|
|
98
98
|
## Apple Developer Portal API
|
99
99
|
|
@@ -111,21 +111,11 @@ When your Apple account has 2 factor verification enabled, you'll automatically
|
|
111
111
|
|
112
112
|
#### Web sessions
|
113
113
|
|
114
|
-
|
115
|
-
|
116
|
-
```sh
|
117
|
-
fastlane spaceauth -u user@example.org
|
118
|
-
```
|
119
|
-
|
120
|
-
This will authenticate you and provide a string that can be transferred to your CI system. Copy everything from `---\n` to your CI server and provide it as environment variable named `FASTLANE_SESSION`. For example:
|
121
|
-
|
122
|
-
```
|
123
|
-
export FASTLANE_SESSION='---\n- !ruby/object:HTTP::Cookie\n name: DES5c148586dfd451e55afbaaa5f62418f91\n value: HSARMTKNSRVTWFla1+yO4gVPowH17VaaaxPFnUdMUegQZxqy1Ie1c2v6bM1vSOzIbuOmrl/FNenlScsd/NbF7/Lw4cpnL15jsyg0TOJwP32tC/NguPiyOaaaU+jrj4tf4uKdIywVaaaFSRVT\n domain: idmsa.apple.com\n for_domain: true\n path: "/"\n secure: true\n httponly: true\n expires: 2016-04-27 23:55:56.000000000 Z\n max_age: \n created_at: 2016-03-28 16:55:57.032086000 -07:00\n accessed_at: 2016-03-28 19:11:17.828141000 -07:00\n'
|
124
|
-
```
|
114
|
+
See [Best Practices > Continuous Integration > Authenticating with Apple services > Method 2: Two-step or two-factor authentication > Storing a manually verified session using spaceauth](https://docs.fastlane.tools/best-practices/continuous-integration/#storing-a-manually-verified-session-using-spaceauth)
|
125
115
|
|
126
116
|
#### Transporter
|
127
117
|
|
128
|
-
See [Continuous Integration >
|
118
|
+
See [Best Practices > Continuous Integration > Authenticating with Apple services > Method 3: Application-specific passwords](https://docs.fastlane.tools/best-practices/continuous-integration/#method-3-application-specific-passwords)
|
129
119
|
|
130
120
|
## _spaceship_ in use
|
131
121
|
|
@@ -89,12 +89,12 @@ module Spaceship
|
|
89
89
|
##
|
90
90
|
# Sets client and returns self for chaining.
|
91
91
|
# @return (Spaceship::Base)
|
92
|
-
# rubocop:disable
|
92
|
+
# rubocop:disable Naming/AccessorMethodName
|
93
93
|
def set_client(client)
|
94
94
|
self.client = client
|
95
95
|
self
|
96
96
|
end
|
97
|
-
# rubocop:enable
|
97
|
+
# rubocop:enable Naming/AccessorMethodName
|
98
98
|
|
99
99
|
##
|
100
100
|
# Binds attributes getters and setters to underlying data returned from the API.
|
@@ -41,6 +41,7 @@ module Spaceship
|
|
41
41
|
attr_accessor :logger
|
42
42
|
|
43
43
|
attr_accessor :csrf_tokens
|
44
|
+
attr_accessor :additional_headers
|
44
45
|
|
45
46
|
attr_accessor :provider
|
46
47
|
|
@@ -134,7 +135,7 @@ module Spaceship
|
|
134
135
|
if teams.count > 1
|
135
136
|
puts("The current user is in #{teams.count} teams. Pass a team ID or call `select_team` to choose a team. Using the first one for now.")
|
136
137
|
end
|
137
|
-
@current_team_id ||=
|
138
|
+
@current_team_id ||= user_details_data['sessionToken']['contentProviderId']
|
138
139
|
end
|
139
140
|
|
140
141
|
# Set a new team ID which will be used from now on
|
@@ -147,6 +148,7 @@ module Spaceship
|
|
147
148
|
available_teams = teams.collect do |team|
|
148
149
|
{
|
149
150
|
team_id: (team["contentProvider"] || {})["contentProviderId"],
|
151
|
+
public_team_id: (team["contentProvider"] || {})["contentProviderPublicId"],
|
150
152
|
team_name: (team["contentProvider"] || {})["name"]
|
151
153
|
}
|
152
154
|
end
|
@@ -161,16 +163,28 @@ module Spaceship
|
|
161
163
|
end
|
162
164
|
|
163
165
|
response = request(:post) do |req|
|
164
|
-
req.url("
|
166
|
+
req.url("https://appstoreconnect.apple.com/olympus/v1/providerSwitchRequests")
|
165
167
|
req.body = {
|
166
|
-
|
167
|
-
|
168
|
+
"data": {
|
169
|
+
"type": "providerSwitchRequests",
|
170
|
+
"relationships": {
|
171
|
+
"provider": {
|
172
|
+
"data": {
|
173
|
+
"type": "providers",
|
174
|
+
"id": result[:public_team_id]
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}
|
168
179
|
}.to_json
|
169
180
|
req.headers['Content-Type'] = 'application/json'
|
170
181
|
end
|
171
182
|
|
172
183
|
handle_itc_response(response.body)
|
173
184
|
|
185
|
+
# clear user_details_data cache, as session switch will have changed sessionToken attribute
|
186
|
+
@_cached_user_details = nil
|
187
|
+
|
174
188
|
@current_team_id = team_id
|
175
189
|
end
|
176
190
|
|
@@ -704,8 +718,13 @@ module Spaceship
|
|
704
718
|
@csrf_tokens || {}
|
705
719
|
end
|
706
720
|
|
721
|
+
def additional_headers
|
722
|
+
@additional_headers || {}
|
723
|
+
end
|
724
|
+
|
707
725
|
def request(method, url_or_path = nil, params = nil, headers = {}, auto_paginate = false, &block)
|
708
726
|
headers.merge!(csrf_tokens)
|
727
|
+
headers.merge!(additional_headers)
|
709
728
|
headers['User-Agent'] = USER_AGENT
|
710
729
|
|
711
730
|
# Before encoding the parameters, log them
|
@@ -880,10 +899,7 @@ module Spaceship
|
|
880
899
|
response = @client.send(method, url_or_path, params, headers, &block)
|
881
900
|
log_response(method, url_or_path, response, headers, &block)
|
882
901
|
|
883
|
-
|
884
|
-
if resp_hash[:status] == 401
|
885
|
-
handle_401(response)
|
886
|
-
end
|
902
|
+
handle_error(response)
|
887
903
|
|
888
904
|
if response.body.to_s.include?("<title>302 Found</title>")
|
889
905
|
raise AppleTimeoutError.new, "Apple 302 detected - this might be temporary server error, check https://developer.apple.com/system-status/ to see if there is a known downtime"
|
@@ -893,22 +909,23 @@ module Spaceship
|
|
893
909
|
raise BadGatewayError.new, "Apple 502 detected - this might be temporary server error, try again later"
|
894
910
|
end
|
895
911
|
|
896
|
-
if resp_hash[:status] == 403
|
897
|
-
msg = "Access forbidden"
|
898
|
-
logger.warn(msg)
|
899
|
-
raise AccessForbiddenError.new, msg
|
900
|
-
elsif resp_hash[:status] == 429
|
901
|
-
raise TooManyRequestsError, resp_hash
|
902
|
-
end
|
903
|
-
|
904
912
|
return response
|
905
913
|
end
|
906
914
|
end
|
907
915
|
|
908
|
-
def
|
909
|
-
|
910
|
-
|
911
|
-
|
916
|
+
def handle_error(response)
|
917
|
+
case response.status
|
918
|
+
when 401
|
919
|
+
msg = "Auth lost"
|
920
|
+
logger.warn(msg)
|
921
|
+
raise UnauthorizedAccessError.new, "Unauthorized Access"
|
922
|
+
when 403
|
923
|
+
msg = "Access forbidden"
|
924
|
+
logger.warn(msg)
|
925
|
+
raise AccessForbiddenError.new, msg
|
926
|
+
when 429
|
927
|
+
raise TooManyRequestsError, response.to_hash
|
928
|
+
end
|
912
929
|
end
|
913
930
|
|
914
931
|
def send_request_auto_paginate(method, url_or_path, params, headers, &block)
|
@@ -3,6 +3,7 @@ require 'highline'
|
|
3
3
|
HighLine.track_eof = false
|
4
4
|
|
5
5
|
require 'fastlane/version'
|
6
|
+
require 'fastlane_core/ui/help_formatter'
|
6
7
|
require_relative 'playground'
|
7
8
|
require_relative 'spaceauth_runner'
|
8
9
|
|
@@ -21,7 +22,7 @@ module Spaceship
|
|
21
22
|
program :help, 'Author', 'Felix Krause <spaceship@krausefx.com>'
|
22
23
|
program :help, 'Website', 'https://fastlane.tools'
|
23
24
|
program :help, 'GitHub', 'https://github.com/fastlane/fastlane/tree/master/spaceship'
|
24
|
-
program :help_formatter,
|
25
|
+
program :help_formatter, FastlaneCore::HelpFormatter
|
25
26
|
|
26
27
|
global_option('-u', '--user USERNAME', 'Specify the Apple ID you want to log in with')
|
27
28
|
global_option('--verbose') { FastlaneCore::Globals.verbose = true }
|
@@ -39,9 +40,10 @@ module Spaceship
|
|
39
40
|
command :spaceauth do |c|
|
40
41
|
c.syntax = 'fastlane spaceship spaceauth'
|
41
42
|
c.description = 'Authentication helper for spaceship/fastlane to work with Apple 2-Step/2FA'
|
43
|
+
c.option('--copy_to_clipboard', 'Whether the session string should be copied to clipboard. For more info see https://docs.fastlane.tools/best-practices/continuous-integration/#storing-a-manually-verified-session-using-spaceauth`')
|
42
44
|
|
43
45
|
c.action do |args, options|
|
44
|
-
Spaceship::SpaceauthRunner.new(username: options.user).run
|
46
|
+
Spaceship::SpaceauthRunner.new(username: options.user, copy_to_clipboard: options.copy_to_clipboard).run
|
45
47
|
end
|
46
48
|
end
|
47
49
|
|
@@ -150,6 +150,12 @@ module Spaceship
|
|
150
150
|
|
151
151
|
protected
|
152
152
|
|
153
|
+
class TimeoutRetryError < StandardError
|
154
|
+
def initialize(msg)
|
155
|
+
super
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
153
159
|
def with_asc_retry(tries = 5, &_block)
|
154
160
|
tries = 1 if Object.const_defined?("SpecHelper")
|
155
161
|
|
@@ -159,7 +165,7 @@ module Spaceship
|
|
159
165
|
|
160
166
|
if [500, 504].include?(status)
|
161
167
|
msg = "Timeout received! Retrying after 3 seconds (remaining: #{tries})..."
|
162
|
-
raise msg
|
168
|
+
raise TimeoutRetryError, msg
|
163
169
|
end
|
164
170
|
|
165
171
|
return response
|
@@ -167,7 +173,7 @@ module Spaceship
|
|
167
173
|
# Catch unathorized access and re-raising
|
168
174
|
# There is no need to try again
|
169
175
|
raise error
|
170
|
-
rescue => error
|
176
|
+
rescue TimeoutRetryError => error
|
171
177
|
tries -= 1
|
172
178
|
puts(error) if Spaceship::Globals.verbose?
|
173
179
|
if tries.zero?
|
@@ -190,7 +196,7 @@ module Spaceship
|
|
190
196
|
|
191
197
|
raise UnexpectedResponse, response.body['error'] if response.body['error']
|
192
198
|
|
193
|
-
raise UnexpectedResponse,
|
199
|
+
raise UnexpectedResponse, format_errors(response) if response.body['errors']
|
194
200
|
|
195
201
|
raise UnexpectedResponse, "Temporary App Store Connect error: #{response.body}" if response.body['statusCode'] == 'ERROR'
|
196
202
|
|
@@ -199,11 +205,40 @@ module Spaceship
|
|
199
205
|
return Spaceship::ConnectAPI::Response.new(body: response.body, status: response.status, headers: response.headers, client: self)
|
200
206
|
end
|
201
207
|
|
202
|
-
|
203
|
-
|
208
|
+
# Overridden from Spaceship::Client
|
209
|
+
def handle_error(response)
|
210
|
+
body = response.body.empty? ? {} : response.body
|
211
|
+
|
212
|
+
# Setting body nil if invalid JSON which can happen if 502
|
213
|
+
begin
|
214
|
+
body = JSON.parse(body) if body.kind_of?(String)
|
215
|
+
rescue
|
216
|
+
nil
|
217
|
+
end
|
218
|
+
|
219
|
+
case response.status.to_i
|
220
|
+
when 401
|
221
|
+
raise UnauthorizedAccessError, format_errors(response)
|
222
|
+
when 403
|
223
|
+
error = (body['errors'] || []).first || {}
|
224
|
+
error_code = error['code']
|
225
|
+
if error_code == "FORBIDDEN.REQUIRED_AGREEMENTS_MISSING_OR_EXPIRED"
|
226
|
+
raise ProgramLicenseAgreementUpdated, format_errors(response)
|
227
|
+
else
|
228
|
+
raise AccessForbiddenError, format_errors(response)
|
229
|
+
end
|
230
|
+
when 502
|
231
|
+
# Issue - https://github.com/fastlane/fastlane/issues/19264
|
232
|
+
# This 502 with "Could not process this request" body sometimes
|
233
|
+
# work and sometimes doesn't
|
234
|
+
# Usually retrying once or twice will solve the issue
|
235
|
+
if body && body.include?("Could not process this request")
|
236
|
+
raise BadGatewayError, "Could not process this request"
|
237
|
+
end
|
238
|
+
end
|
204
239
|
end
|
205
240
|
|
206
|
-
def
|
241
|
+
def format_errors(response)
|
207
242
|
# Example error format
|
208
243
|
# {
|
209
244
|
# "errors":[
|
@@ -247,8 +282,39 @@ module Spaceship
|
|
247
282
|
# ]
|
248
283
|
# }
|
249
284
|
|
250
|
-
|
251
|
-
|
285
|
+
# Detail is missing in this response making debugging super hard
|
286
|
+
# {"errors" =>
|
287
|
+
# [
|
288
|
+
# {
|
289
|
+
# "id"=>"80ea6cff-0043-4543-9cd1-3e26b0fce383",
|
290
|
+
# "status"=>"409",
|
291
|
+
# "code"=>"ENTITY_ERROR.RELATIONSHIP.INVALID",
|
292
|
+
# "title"=>"The provided entity includes a relationship with an invalid value",
|
293
|
+
# "source"=>{
|
294
|
+
# "pointer"=>"/data/relationships/primarySubcategoryOne"
|
295
|
+
# }
|
296
|
+
# }
|
297
|
+
# ]
|
298
|
+
# }
|
299
|
+
|
300
|
+
# Membership expired
|
301
|
+
# {
|
302
|
+
# "errors" : [
|
303
|
+
# {
|
304
|
+
# "id" : "UUID",
|
305
|
+
# "status" : "403",
|
306
|
+
# "code" : "FORBIDDEN_ERROR",
|
307
|
+
# "title" : "This request is forbidden for security reasons",
|
308
|
+
# "detail" : "Team ID: 'ID' is not associated with an active membership. To check your teams membership status, sign in your account on the developer website. https://developer.apple.com/account/"
|
309
|
+
# }
|
310
|
+
# ]
|
311
|
+
# }
|
312
|
+
|
313
|
+
body = response.body.empty? ? {} : response.body
|
314
|
+
body = JSON.parse(body) if body.kind_of?(String)
|
315
|
+
|
316
|
+
formatted_errors = (body['errors'] || []).map do |error|
|
317
|
+
messages = [[error['title'], error['detail'], error.dig("source", "pointer")].compact.join(" - ")]
|
252
318
|
|
253
319
|
meta = error["meta"] || {}
|
254
320
|
associated_errors = meta["associatedErrors"] || {}
|
@@ -257,6 +323,12 @@ module Spaceship
|
|
257
323
|
[[associated_error["title"], associated_error["detail"]].compact.join(" - ")]
|
258
324
|
end
|
259
325
|
end.flatten.join("\n")
|
326
|
+
|
327
|
+
if formatted_errors.empty?
|
328
|
+
formatted_errors << "Unknown error"
|
329
|
+
end
|
330
|
+
|
331
|
+
return formatted_errors
|
260
332
|
end
|
261
333
|
|
262
334
|
private
|
@@ -30,7 +30,7 @@ module Spaceship
|
|
30
30
|
# Creates alias for :minOsVersion to :min_os_version
|
31
31
|
#
|
32
32
|
def attr_mapping(attr_map)
|
33
|
-
self.reverse_attr_map ||= attr_map.invert.
|
33
|
+
self.reverse_attr_map ||= attr_map.invert.transform_keys(&:to_sym)
|
34
34
|
attr_map.each do |key, value|
|
35
35
|
# Actual
|
36
36
|
reader = value.to_sym
|
@@ -6,23 +6,29 @@ module Spaceship
|
|
6
6
|
|
7
7
|
# Rating
|
8
8
|
attr_accessor :alcohol_tobacco_or_drug_use_or_references
|
9
|
+
attr_accessor :contests
|
9
10
|
attr_accessor :gambling_simulated
|
10
11
|
attr_accessor :medical_or_treatment_information
|
11
12
|
attr_accessor :profanity_or_crude_humor
|
12
13
|
attr_accessor :sexual_content_graphic_and_nudity
|
14
|
+
attr_accessor :sexual_content_or_nudity
|
13
15
|
attr_accessor :horror_or_fear_themes
|
14
16
|
attr_accessor :mature_or_suggestive_themes
|
15
17
|
attr_accessor :violence_cartoon_or_fantasy
|
16
18
|
attr_accessor :violence_realistic_prolonged_graphic_or_sadistic
|
17
19
|
attr_accessor :violence_realistic
|
18
20
|
|
19
|
-
#
|
20
|
-
attr_accessor :
|
21
|
+
# Boolean
|
22
|
+
attr_accessor :gambling
|
23
|
+
attr_accessor :seventeen_plus
|
21
24
|
attr_accessor :unrestricted_web_access
|
22
25
|
|
23
26
|
# KidsAge
|
24
27
|
attr_accessor :kids_age_band
|
25
28
|
|
29
|
+
# Deprecated as of App Store Connect API 1.3
|
30
|
+
attr_accessor :gambling_and_contests
|
31
|
+
|
26
32
|
module Rating
|
27
33
|
NONE = "NONE"
|
28
34
|
INFREQUENT_OR_MILD = "INFREQUENT_OR_MILD"
|
@@ -37,10 +43,12 @@ module Spaceship
|
|
37
43
|
|
38
44
|
attr_mapping({
|
39
45
|
"alcoholTobaccoOrDrugUseOrReferences" => "alcohol_tobacco_or_drug_use_or_references",
|
40
|
-
"
|
46
|
+
"contests" => "contests",
|
47
|
+
"gambling" => "gambling",
|
41
48
|
"gamblingSimulated" => "gambling_simulated",
|
42
49
|
"medicalOrTreatmentInformation" => "medical_or_treatment_information",
|
43
50
|
"profanityOrCrudeHumor" => "profanity_or_crude_humor",
|
51
|
+
"seventeenPlus" => "seventeen_plus",
|
44
52
|
"sexualContentGraphicAndNudity" => "sexual_content_graphic_and_nudity",
|
45
53
|
"sexualContentOrNudity" => "sexual_content_or_nudity",
|
46
54
|
"horrorOrFearThemes" => "horror_or_fear_themes",
|
@@ -49,7 +57,10 @@ module Spaceship
|
|
49
57
|
"violenceCartoonOrFantasy" => "violence_cartoon_or_fantasy",
|
50
58
|
"violenceRealisticProlongedGraphicOrSadistic" => "violence_realistic_prolonged_graphic_or_sadistic",
|
51
59
|
"violenceRealistic" => "violence_realistic",
|
52
|
-
"kidsAgeBand" => "kids_age_band"
|
60
|
+
"kidsAgeBand" => "kids_age_band",
|
61
|
+
|
62
|
+
# Deprecated as of App Store Connect API 1.3
|
63
|
+
"gamblingAndContests" => "gambling_and_contests",
|
53
64
|
})
|
54
65
|
|
55
66
|
def self.type
|
@@ -83,6 +94,27 @@ module Spaceship
|
|
83
94
|
1 => true
|
84
95
|
}
|
85
96
|
|
97
|
+
def self.map_deprecation_if_possible(attributes)
|
98
|
+
attributes = attributes.dup
|
99
|
+
messages = []
|
100
|
+
errors = []
|
101
|
+
|
102
|
+
value = attributes.delete('gamblingAndContests')
|
103
|
+
return attributes, messages, errors if value.nil?
|
104
|
+
|
105
|
+
messages << "Age Rating 'gamblingAndContests' has been deprecated and split into 'gambling' and 'contests'"
|
106
|
+
|
107
|
+
attributes['gambling'] = value
|
108
|
+
if value == true
|
109
|
+
errors << "'gamblingAndContests' could not be mapped to 'contests' - 'contests' requires a value of 'NONE', 'INFREQUENT_OR_MILD', or 'FREQUENT_OR_INTENSE'"
|
110
|
+
attributes['contests'] = value
|
111
|
+
else
|
112
|
+
attributes['contests'] = 'NONE'
|
113
|
+
end
|
114
|
+
|
115
|
+
return attributes, messages, errors
|
116
|
+
end
|
117
|
+
|
86
118
|
def self.map_key_from_itc(key)
|
87
119
|
key = key.gsub("MZGenre.", "")
|
88
120
|
return nil if key.empty?
|
@@ -203,7 +203,7 @@ module Spaceship
|
|
203
203
|
# @return (Bool) Was something changed?
|
204
204
|
def ensure_version!(version_string, platform: nil, client: nil)
|
205
205
|
client ||= Spaceship::ConnectAPI
|
206
|
-
app_store_version = get_edit_app_store_version(platform: platform)
|
206
|
+
app_store_version = get_edit_app_store_version(client: client, platform: platform)
|
207
207
|
|
208
208
|
if app_store_version
|
209
209
|
if version_string != app_store_version.version_string
|
@@ -385,11 +385,12 @@ module Spaceship
|
|
385
385
|
return resps.flat_map(&:to_models)
|
386
386
|
end
|
387
387
|
|
388
|
-
def create_beta_group(client: nil, group_name: nil, public_link_enabled: false, public_link_limit: 10_000, public_link_limit_enabled: false)
|
388
|
+
def create_beta_group(client: nil, group_name: nil, is_internal_group: false, public_link_enabled: false, public_link_limit: 10_000, public_link_limit_enabled: false)
|
389
389
|
client ||= Spaceship::ConnectAPI
|
390
390
|
resps = client.create_beta_group(
|
391
391
|
app_id: id,
|
392
392
|
group_name: group_name,
|
393
|
+
is_internal_group: is_internal_group,
|
393
394
|
public_link_enabled: public_link_enabled,
|
394
395
|
public_link_limit: public_link_limit,
|
395
396
|
public_link_limit_enabled: public_link_limit_enabled
|
@@ -423,6 +424,13 @@ module Spaceship
|
|
423
424
|
client.add_user_visible_apps(user_id: user_id, app_ids: [id])
|
424
425
|
end
|
425
426
|
end
|
427
|
+
|
428
|
+
def remove_users(client: nil, user_ids: nil)
|
429
|
+
client ||= Spaceship::ConnectAPI
|
430
|
+
user_ids.each do |user_id|
|
431
|
+
client.delete_user_visible_apps(user_id: user_id, app_ids: [id])
|
432
|
+
end
|
433
|
+
end
|
426
434
|
end
|
427
435
|
end
|
428
436
|
end
|
@@ -81,6 +81,16 @@ module Spaceship
|
|
81
81
|
client.delete_app_info(app_info_id: id)
|
82
82
|
end
|
83
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
|
92
|
+
end
|
93
|
+
|
84
94
|
#
|
85
95
|
# App Info Localizations
|
86
96
|
#
|
@@ -69,6 +69,11 @@ module Spaceship
|
|
69
69
|
return client.get_app_preview_set(app_preview_set_id: app_preview_set_id, filter: nil, includes: includes, limit: nil, sort: nil).first
|
70
70
|
end
|
71
71
|
|
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
|
+
|
72
77
|
def upload_preview(client: nil, path: nil, wait_for_processing: true, position: nil, frame_time_code: nil)
|
73
78
|
client ||= Spaceship::ConnectAPI
|
74
79
|
# Upload preview
|
@@ -112,7 +112,7 @@ module Spaceship
|
|
112
112
|
timeout_minutes = (ENV["SPACESHIP_SCREENSHOT_UPLOAD_TIMEOUT"] || 20).to_i
|
113
113
|
|
114
114
|
loop do
|
115
|
-
# 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.
|
116
116
|
# It should handle errors based on what status code is.
|
117
117
|
puts("Waiting for screenshots to appear before uploading. This is unlikely to be recovered unless it's 503 error. error=\"#{error}\"")
|
118
118
|
sleep(30)
|
@@ -123,6 +123,11 @@ module Spaceship
|
|
123
123
|
return client.get_app_screenshot_set(app_screenshot_set_id: app_screenshot_set_id, filter: nil, includes: includes, limit: nil, sort: nil).first
|
124
124
|
end
|
125
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
|
+
|
126
131
|
def upload_screenshot(client: nil, path: nil, wait_for_processing: true, position: nil)
|
127
132
|
client ||= Spaceship::ConnectAPI
|
128
133
|
screenshot = Spaceship::ConnectAPI::AppScreenshot.create(client: client, app_screenshot_set_id: id, path: path, wait_for_processing: wait_for_processing)
|
@@ -110,10 +110,9 @@ module Spaceship
|
|
110
110
|
# Age Rating Declaration
|
111
111
|
#
|
112
112
|
|
113
|
+
# @deprecated
|
113
114
|
def fetch_age_rating_declaration(client: nil)
|
114
|
-
|
115
|
-
resp = client.get_age_rating_declaration(app_store_version_id: id)
|
116
|
-
return resp.to_models.first
|
115
|
+
raise 'AppStoreVersion no longer as AgeRatingDeclaration as of App Store Connect API 1.3 - Use AppInfo instead'
|
117
116
|
end
|
118
117
|
|
119
118
|
#
|
@@ -39,6 +39,12 @@ module Spaceship
|
|
39
39
|
# API
|
40
40
|
#
|
41
41
|
|
42
|
+
def self.get(client: nil, app_store_version_localization_id: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
43
|
+
client ||= Spaceship::ConnectAPI
|
44
|
+
resp = client.get_app_store_version_localization(app_store_version_localization_id: app_store_version_localization_id, filter: filter, includes: includes, limit: limit, sort: sort)
|
45
|
+
return resp.to_models
|
46
|
+
end
|
47
|
+
|
42
48
|
def self.all(client: nil, app_store_version_id: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
43
49
|
client ||= Spaceship::ConnectAPI
|
44
50
|
resp = client.get_app_store_version_localizations(app_store_version_id: app_store_version_id, filter: filter, includes: includes, limit: limit, sort: sort)
|
@@ -12,6 +12,7 @@ module Spaceship
|
|
12
12
|
attr_accessor :public_link_limit_enabled
|
13
13
|
attr_accessor :public_link_limit
|
14
14
|
attr_accessor :public_link
|
15
|
+
attr_accessor :beta_testers
|
15
16
|
|
16
17
|
attr_mapping({
|
17
18
|
"name" => "name",
|
@@ -21,7 +22,8 @@ module Spaceship
|
|
21
22
|
"publicLinkId" => "public_link_id",
|
22
23
|
"publicLinkLimitEnabled" => "public_link_limit_enabled",
|
23
24
|
"publicLinkLimit" => "public_link_limit",
|
24
|
-
"publicLink" => "public_link"
|
25
|
+
"publicLink" => "public_link",
|
26
|
+
"betaTesters" => "beta_testers"
|
25
27
|
})
|
26
28
|
|
27
29
|
def self.type
|
@@ -38,6 +40,11 @@ module Spaceship
|
|
38
40
|
return client.post_bulk_beta_tester_assignments(beta_group_id: id, beta_testers: beta_testers)
|
39
41
|
end
|
40
42
|
|
43
|
+
def add_beta_testers(client: nil, beta_tester_ids:)
|
44
|
+
client ||= Spaceship::ConnectAPI
|
45
|
+
return client.add_beta_tester_to_group(beta_group_id: id, beta_tester_ids: beta_tester_ids)
|
46
|
+
end
|
47
|
+
|
41
48
|
def update(client: nil, attributes: nil)
|
42
49
|
return if attributes.empty?
|
43
50
|
|
@@ -13,6 +13,7 @@ module Spaceship
|
|
13
13
|
attr_accessor :apps
|
14
14
|
attr_accessor :beta_groups
|
15
15
|
attr_accessor :beta_tester_metrics
|
16
|
+
attr_accessor :builds
|
16
17
|
|
17
18
|
attr_mapping({
|
18
19
|
"firstName" => "first_name",
|
@@ -23,7 +24,8 @@ module Spaceship
|
|
23
24
|
|
24
25
|
"apps" => "apps",
|
25
26
|
"betaGroups" => "beta_groups",
|
26
|
-
"betaTesterMetrics" => "beta_tester_metrics"
|
27
|
+
"betaTesterMetrics" => "beta_tester_metrics",
|
28
|
+
"builds" => "builds"
|
27
29
|
})
|
28
30
|
|
29
31
|
def self.type
|
@@ -17,8 +17,10 @@ module Spaceship
|
|
17
17
|
attr_accessor :app
|
18
18
|
attr_accessor :beta_app_review_submission
|
19
19
|
attr_accessor :beta_build_metrics
|
20
|
+
attr_accessor :beta_build_localizations
|
20
21
|
attr_accessor :build_beta_detail
|
21
22
|
attr_accessor :pre_release_version
|
23
|
+
attr_accessor :individual_testers
|
22
24
|
|
23
25
|
attr_mapping({
|
24
26
|
"version" => "version",
|
@@ -33,8 +35,10 @@ module Spaceship
|
|
33
35
|
"app" => "app",
|
34
36
|
"betaAppReviewSubmission" => "beta_app_review_submission",
|
35
37
|
"betaBuildMetrics" => "beta_build_metrics",
|
38
|
+
"betaBuildLocalizations" => "beta_build_localizations",
|
36
39
|
"buildBetaDetail" => "build_beta_detail",
|
37
|
-
"preReleaseVersion" => "pre_release_version"
|
40
|
+
"preReleaseVersion" => "pre_release_version",
|
41
|
+
"individualTesters" => "individual_testers"
|
38
42
|
})
|
39
43
|
|
40
44
|
ESSENTIAL_INCLUDES = "app,buildBetaDetail,preReleaseVersion"
|
@@ -82,11 +86,20 @@ module Spaceship
|
|
82
86
|
return build_beta_detail.nil? == false && build_beta_detail.ready_for_internal_testing?
|
83
87
|
end
|
84
88
|
|
89
|
+
def ready_for_external_testing?
|
90
|
+
return build_beta_detail.nil? == false && build_beta_detail.ready_for_external_testing?
|
91
|
+
end
|
92
|
+
|
85
93
|
def ready_for_beta_submission?
|
86
94
|
raise "No build_beta_detail included" unless build_beta_detail
|
87
95
|
return build_beta_detail.ready_for_beta_submission?
|
88
96
|
end
|
89
97
|
|
98
|
+
def missing_export_compliance?
|
99
|
+
raise "No build_beta_detail included" unless build_beta_detail
|
100
|
+
return build_beta_detail.missing_export_compliance?
|
101
|
+
end
|
102
|
+
|
90
103
|
# This is here temporarily until the removal of Spaceship::TestFlight
|
91
104
|
def to_testflight_build
|
92
105
|
h = {
|
@@ -53,9 +53,17 @@ module Spaceship
|
|
53
53
|
return internal_build_state == InternalState::READY_FOR_BETA_TESTING
|
54
54
|
end
|
55
55
|
|
56
|
+
def processed?
|
57
|
+
return internal_build_state != InternalState::PROCESSING && external_build_state != ExternalState::PROCESSING
|
58
|
+
end
|
59
|
+
|
56
60
|
def ready_for_beta_submission?
|
57
61
|
return external_build_state == ExternalState::READY_FOR_BETA_SUBMISSION
|
58
62
|
end
|
63
|
+
|
64
|
+
def missing_export_compliance?
|
65
|
+
return external_build_state == ExternalState::MISSING_EXPORT_COMPLIANCE
|
66
|
+
end
|
59
67
|
end
|
60
68
|
end
|
61
69
|
end
|