fastlane_pricing_fix 2.212.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +1 -0
- data/LICENSE +21 -0
- data/README.md +235 -0
- data/bin/bin-proxy +19 -0
- data/bin/fastlane +23 -0
- data/cert/README.md +17 -0
- data/cert/lib/cert/commands_generator.rb +61 -0
- data/cert/lib/cert/module.rb +16 -0
- data/cert/lib/cert/options.rb +133 -0
- data/cert/lib/cert/runner.rb +250 -0
- data/cert/lib/cert.rb +4 -0
- data/credentials_manager/README.md +64 -0
- data/credentials_manager/lib/credentials_manager/account_manager.rb +157 -0
- data/credentials_manager/lib/credentials_manager/appfile_config.rb +196 -0
- data/credentials_manager/lib/credentials_manager/cli.rb +69 -0
- data/credentials_manager/lib/credentials_manager.rb +7 -0
- data/deliver/README.md +17 -0
- data/deliver/lib/assets/DeliverfileDefault +3 -0
- data/deliver/lib/assets/DeliverfileDefault.swift +13 -0
- data/deliver/lib/assets/ScreenshotsHelp +30 -0
- data/deliver/lib/assets/summary.html.erb +299 -0
- data/deliver/lib/deliver/app_screenshot.rb +387 -0
- data/deliver/lib/deliver/app_screenshot_iterator.rb +95 -0
- data/deliver/lib/deliver/app_screenshot_validator.rb +108 -0
- data/deliver/lib/deliver/commands_generator.rb +191 -0
- data/deliver/lib/deliver/detect_values.rb +104 -0
- data/deliver/lib/deliver/download_screenshots.rb +75 -0
- data/deliver/lib/deliver/generate_summary.rb +13 -0
- data/deliver/lib/deliver/html_generator.rb +78 -0
- data/deliver/lib/deliver/languages.rb +7 -0
- data/deliver/lib/deliver/loader.rb +157 -0
- data/deliver/lib/deliver/module.rb +24 -0
- data/deliver/lib/deliver/options.rb +461 -0
- data/deliver/lib/deliver/runner.rb +310 -0
- data/deliver/lib/deliver/screenshot_comparable.rb +62 -0
- data/deliver/lib/deliver/setup.rb +203 -0
- data/deliver/lib/deliver/submit_for_review.rb +236 -0
- data/deliver/lib/deliver/sync_screenshots.rb +200 -0
- data/deliver/lib/deliver/upload_metadata.rb +699 -0
- data/deliver/lib/deliver/upload_price_tier.rb +42 -0
- data/deliver/lib/deliver/upload_screenshots.rb +271 -0
- data/deliver/lib/deliver.rb +15 -0
- data/fastlane/README.md +11 -0
- data/fastlane/lib/assets/ActionDetails.md.erb +106 -0
- data/fastlane/lib/assets/Actions.md.erb +43 -0
- data/fastlane/lib/assets/AppfileTemplate +6 -0
- data/fastlane/lib/assets/AppfileTemplate.swift +7 -0
- data/fastlane/lib/assets/AppfileTemplateAndroid +2 -0
- data/fastlane/lib/assets/DefaultFastfileTemplate +20 -0
- data/fastlane/lib/assets/DefaultFastfileTemplate.swift +13 -0
- data/fastlane/lib/assets/completions/completion.bash +26 -0
- data/fastlane/lib/assets/completions/completion.fish +39 -0
- data/fastlane/lib/assets/completions/completion.sh +12 -0
- data/fastlane/lib/assets/completions/completion.zsh +24 -0
- data/fastlane/lib/assets/custom_action_template.rb +82 -0
- data/fastlane/lib/assets/mailgun_html_template.erb +142 -0
- data/fastlane/lib/assets/report_template.xml.erb +15 -0
- data/fastlane/lib/assets/s3_html_template.erb +105 -0
- data/fastlane/lib/assets/s3_plist_template.erb +31 -0
- data/fastlane/lib/assets/s3_version_template.erb +4 -0
- data/fastlane/lib/fastlane/action.rb +198 -0
- data/fastlane/lib/fastlane/action_collector.rb +35 -0
- data/fastlane/lib/fastlane/actions/README.md +5 -0
- data/fastlane/lib/fastlane/actions/actions_helper.rb +185 -0
- data/fastlane/lib/fastlane/actions/adb.rb +75 -0
- data/fastlane/lib/fastlane/actions/adb_devices.rb +70 -0
- data/fastlane/lib/fastlane/actions/add_extra_platforms.rb +45 -0
- data/fastlane/lib/fastlane/actions/add_git_tag.rb +138 -0
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +255 -0
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +148 -0
- data/fastlane/lib/fastlane/actions/appaloosa.rb +271 -0
- data/fastlane/lib/fastlane/actions/appetize.rb +193 -0
- data/fastlane/lib/fastlane/actions/appetize_viewing_url_generator.rb +135 -0
- data/fastlane/lib/fastlane/actions/appium.rb +181 -0
- data/fastlane/lib/fastlane/actions/appledoc.rb +226 -0
- data/fastlane/lib/fastlane/actions/appstore.rb +14 -0
- data/fastlane/lib/fastlane/actions/apteligent.rb +106 -0
- data/fastlane/lib/fastlane/actions/artifactory.rb +189 -0
- data/fastlane/lib/fastlane/actions/automatic_code_signing.rb +220 -0
- data/fastlane/lib/fastlane/actions/backup_file.rb +41 -0
- data/fastlane/lib/fastlane/actions/backup_xcarchive.rb +135 -0
- data/fastlane/lib/fastlane/actions/badge.rb +151 -0
- data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +113 -0
- data/fastlane/lib/fastlane/actions/build_android_app.rb +14 -0
- data/fastlane/lib/fastlane/actions/build_app.rb +171 -0
- data/fastlane/lib/fastlane/actions/build_ios_app.rb +47 -0
- data/fastlane/lib/fastlane/actions/build_mac_app.rb +46 -0
- data/fastlane/lib/fastlane/actions/bundle_install.rb +166 -0
- data/fastlane/lib/fastlane/actions/capture_android_screenshots.rb +63 -0
- data/fastlane/lib/fastlane/actions/capture_ios_screenshots.rb +61 -0
- data/fastlane/lib/fastlane/actions/capture_screenshots.rb +14 -0
- data/fastlane/lib/fastlane/actions/carthage.rb +238 -0
- data/fastlane/lib/fastlane/actions/cert.rb +14 -0
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +188 -0
- data/fastlane/lib/fastlane/actions/chatwork.rb +95 -0
- data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +62 -0
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +71 -0
- data/fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb +75 -0
- data/fastlane/lib/fastlane/actions/clear_derived_data.rb +70 -0
- data/fastlane/lib/fastlane/actions/clipboard.rb +49 -0
- data/fastlane/lib/fastlane/actions/cloc.rb +85 -0
- data/fastlane/lib/fastlane/actions/cocoapods.rb +178 -0
- data/fastlane/lib/fastlane/actions/commit_github_file.rb +194 -0
- data/fastlane/lib/fastlane/actions/commit_version_bump.rb +300 -0
- data/fastlane/lib/fastlane/actions/copy_artifacts.rb +113 -0
- data/fastlane/lib/fastlane/actions/create_app_on_managed_play_store.rb +168 -0
- data/fastlane/lib/fastlane/actions/create_app_online.rb +75 -0
- data/fastlane/lib/fastlane/actions/create_keychain.rb +179 -0
- data/fastlane/lib/fastlane/actions/create_pull_request.rb +271 -0
- data/fastlane/lib/fastlane/actions/create_xcframework.rb +203 -0
- data/fastlane/lib/fastlane/actions/danger.rb +146 -0
- data/fastlane/lib/fastlane/actions/debug.rb +32 -0
- data/fastlane/lib/fastlane/actions/default_platform.rb +47 -0
- data/fastlane/lib/fastlane/actions/delete_keychain.rb +68 -0
- data/fastlane/lib/fastlane/actions/deliver.rb +14 -0
- data/fastlane/lib/fastlane/actions/deploygate.rb +209 -0
- data/fastlane/lib/fastlane/actions/device_grid/README.md +157 -0
- data/fastlane/lib/fastlane/actions/docs/build_app.md +245 -0
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +349 -0
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +375 -0
- data/fastlane/lib/fastlane/actions/docs/check_app_store_metadata.md +103 -0
- data/fastlane/lib/fastlane/actions/docs/create_app_online.md +386 -0
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +366 -0
- data/fastlane/lib/fastlane/actions/docs/get_certificates.md +86 -0
- data/fastlane/lib/fastlane/actions/docs/get_provisioning_profile.md +223 -0
- data/fastlane/lib/fastlane/actions/docs/get_push_certificate.md +134 -0
- data/fastlane/lib/fastlane/actions/docs/run_tests.md +151 -0
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +579 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +748 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +204 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +260 -0
- data/fastlane/lib/fastlane/actions/dotgpg_environment.rb +57 -0
- data/fastlane/lib/fastlane/actions/download.rb +76 -0
- data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +142 -0
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +373 -0
- data/fastlane/lib/fastlane/actions/download_from_play_store.rb +61 -0
- data/fastlane/lib/fastlane/actions/dsym_zip.rb +93 -0
- data/fastlane/lib/fastlane/actions/echo.rb +14 -0
- data/fastlane/lib/fastlane/actions/ensure_bundle_exec.rb +59 -0
- data/fastlane/lib/fastlane/actions/ensure_env_vars.rb +54 -0
- data/fastlane/lib/fastlane/actions/ensure_git_branch.rb +68 -0
- data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +102 -0
- data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +133 -0
- data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +124 -0
- data/fastlane/lib/fastlane/actions/environment_variable.rb +69 -0
- data/fastlane/lib/fastlane/actions/erb.rb +93 -0
- data/fastlane/lib/fastlane/actions/fastlane_version.rb +15 -0
- data/fastlane/lib/fastlane/actions/flock.rb +82 -0
- data/fastlane/lib/fastlane/actions/frame_screenshots.rb +64 -0
- data/fastlane/lib/fastlane/actions/frameit.rb +14 -0
- data/fastlane/lib/fastlane/actions/gcovr.rb +163 -0
- data/fastlane/lib/fastlane/actions/get_build_number.rb +106 -0
- data/fastlane/lib/fastlane/actions/get_build_number_repository.rb +120 -0
- data/fastlane/lib/fastlane/actions/get_certificates.rb +81 -0
- data/fastlane/lib/fastlane/actions/get_github_release.rb +176 -0
- data/fastlane/lib/fastlane/actions/get_info_plist_value.rb +78 -0
- data/fastlane/lib/fastlane/actions/get_ipa_info_plist_value.rb +81 -0
- data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +117 -0
- data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +109 -0
- data/fastlane/lib/fastlane/actions/get_push_certificate.rb +87 -0
- data/fastlane/lib/fastlane/actions/get_version_number.rb +212 -0
- data/fastlane/lib/fastlane/actions/git_add.rb +88 -0
- data/fastlane/lib/fastlane/actions/git_branch.rb +55 -0
- data/fastlane/lib/fastlane/actions/git_commit.rb +80 -0
- data/fastlane/lib/fastlane/actions/git_pull.rb +58 -0
- data/fastlane/lib/fastlane/actions/git_remote_branch.rb +57 -0
- data/fastlane/lib/fastlane/actions/git_submodule_update.rb +60 -0
- data/fastlane/lib/fastlane/actions/git_tag_exists.rb +78 -0
- data/fastlane/lib/fastlane/actions/github_api.rb +271 -0
- data/fastlane/lib/fastlane/actions/google_play_track_release_names.rb +74 -0
- data/fastlane/lib/fastlane/actions/google_play_track_version_codes.rb +77 -0
- data/fastlane/lib/fastlane/actions/gradle.rb +334 -0
- data/fastlane/lib/fastlane/actions/gym.rb +10 -0
- data/fastlane/lib/fastlane/actions/hg_add_tag.rb +48 -0
- data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +183 -0
- data/fastlane/lib/fastlane/actions/hg_ensure_clean_status.rb +53 -0
- data/fastlane/lib/fastlane/actions/hg_push.rb +64 -0
- data/fastlane/lib/fastlane/actions/hipchat.rb +200 -0
- data/fastlane/lib/fastlane/actions/hockey.rb +399 -0
- data/fastlane/lib/fastlane/actions/ifttt.rb +93 -0
- data/fastlane/lib/fastlane/actions/import.rb +49 -0
- data/fastlane/lib/fastlane/actions/import_certificate.rb +77 -0
- data/fastlane/lib/fastlane/actions/import_from_git.rb +81 -0
- data/fastlane/lib/fastlane/actions/increment_build_number.rb +123 -0
- data/fastlane/lib/fastlane/actions/increment_version_number.rb +180 -0
- data/fastlane/lib/fastlane/actions/install_on_device.rb +92 -0
- data/fastlane/lib/fastlane/actions/install_provisioning_profile.rb +62 -0
- data/fastlane/lib/fastlane/actions/install_xcode_plugin.rb +91 -0
- data/fastlane/lib/fastlane/actions/installr.rb +129 -0
- data/fastlane/lib/fastlane/actions/ipa.rb +246 -0
- data/fastlane/lib/fastlane/actions/is_ci.rb +51 -0
- data/fastlane/lib/fastlane/actions/jazzy.rb +59 -0
- data/fastlane/lib/fastlane/actions/jira.rb +162 -0
- data/fastlane/lib/fastlane/actions/lane_context.rb +60 -0
- data/fastlane/lib/fastlane/actions/last_git_commit.rb +58 -0
- data/fastlane/lib/fastlane/actions/last_git_tag.rb +60 -0
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +154 -0
- data/fastlane/lib/fastlane/actions/lcov.rb +98 -0
- data/fastlane/lib/fastlane/actions/mailgun.rb +191 -0
- data/fastlane/lib/fastlane/actions/make_changelog_from_jenkins.rb +81 -0
- data/fastlane/lib/fastlane/actions/match.rb +14 -0
- data/fastlane/lib/fastlane/actions/match_nuke.rb +59 -0
- data/fastlane/lib/fastlane/actions/min_fastlane_version.rb +57 -0
- data/fastlane/lib/fastlane/actions/modify_services.rb +208 -0
- data/fastlane/lib/fastlane/actions/nexus_upload.rb +231 -0
- data/fastlane/lib/fastlane/actions/notarize.rb +340 -0
- data/fastlane/lib/fastlane/actions/notification.rb +75 -0
- data/fastlane/lib/fastlane/actions/notify.rb +40 -0
- data/fastlane/lib/fastlane/actions/number_of_commits.rb +75 -0
- data/fastlane/lib/fastlane/actions/oclint.rb +270 -0
- data/fastlane/lib/fastlane/actions/onesignal.rb +196 -0
- data/fastlane/lib/fastlane/actions/opt_out_crash_reporting.rb +33 -0
- data/fastlane/lib/fastlane/actions/opt_out_usage.rb +40 -0
- data/fastlane/lib/fastlane/actions/pem.rb +14 -0
- data/fastlane/lib/fastlane/actions/pilot.rb +14 -0
- data/fastlane/lib/fastlane/actions/pod_lib_lint.rb +189 -0
- data/fastlane/lib/fastlane/actions/pod_push.rb +198 -0
- data/fastlane/lib/fastlane/actions/podio_item.rb +210 -0
- data/fastlane/lib/fastlane/actions/precheck.rb +14 -0
- data/fastlane/lib/fastlane/actions/println.rb +14 -0
- data/fastlane/lib/fastlane/actions/produce.rb +14 -0
- data/fastlane/lib/fastlane/actions/prompt.rb +118 -0
- data/fastlane/lib/fastlane/actions/push_git_tags.rb +76 -0
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +138 -0
- data/fastlane/lib/fastlane/actions/puts.rb +67 -0
- data/fastlane/lib/fastlane/actions/read_podspec.rb +90 -0
- data/fastlane/lib/fastlane/actions/recreate_schemes.rb +46 -0
- data/fastlane/lib/fastlane/actions/register_device.rb +148 -0
- data/fastlane/lib/fastlane/actions/register_devices.rb +211 -0
- data/fastlane/lib/fastlane/actions/reset_git_repo.rb +118 -0
- data/fastlane/lib/fastlane/actions/reset_simulator_contents.rb +90 -0
- data/fastlane/lib/fastlane/actions/resign.rb +125 -0
- data/fastlane/lib/fastlane/actions/restore_file.rb +44 -0
- data/fastlane/lib/fastlane/actions/rocket.rb +83 -0
- data/fastlane/lib/fastlane/actions/rsync.rb +71 -0
- data/fastlane/lib/fastlane/actions/ruby_version.rb +56 -0
- data/fastlane/lib/fastlane/actions/run_tests.rb +124 -0
- data/fastlane/lib/fastlane/actions/s3.rb +174 -0
- data/fastlane/lib/fastlane/actions/say.rb +55 -0
- data/fastlane/lib/fastlane/actions/scan.rb +14 -0
- data/fastlane/lib/fastlane/actions/scp.rb +108 -0
- data/fastlane/lib/fastlane/actions/screengrab.rb +14 -0
- data/fastlane/lib/fastlane/actions/set_build_number_repository.rb +76 -0
- data/fastlane/lib/fastlane/actions/set_changelog.rb +201 -0
- data/fastlane/lib/fastlane/actions/set_github_release.rb +287 -0
- data/fastlane/lib/fastlane/actions/set_info_plist_value.rb +92 -0
- data/fastlane/lib/fastlane/actions/set_pod_key.rb +77 -0
- data/fastlane/lib/fastlane/actions/setup_ci.rb +140 -0
- data/fastlane/lib/fastlane/actions/setup_circle_ci.rb +58 -0
- data/fastlane/lib/fastlane/actions/setup_jenkins.rb +197 -0
- data/fastlane/lib/fastlane/actions/setup_travis.rb +57 -0
- data/fastlane/lib/fastlane/actions/sh.rb +69 -0
- data/fastlane/lib/fastlane/actions/sigh.rb +14 -0
- data/fastlane/lib/fastlane/actions/skip_docs.rb +52 -0
- data/fastlane/lib/fastlane/actions/slack.rb +307 -0
- data/fastlane/lib/fastlane/actions/slather.rb +319 -0
- data/fastlane/lib/fastlane/actions/snapshot.rb +14 -0
- data/fastlane/lib/fastlane/actions/sonar.rb +170 -0
- data/fastlane/lib/fastlane/actions/sourcedocs.rb +128 -0
- data/fastlane/lib/fastlane/actions/spaceship_logs.rb +135 -0
- data/fastlane/lib/fastlane/actions/spaceship_stats.rb +73 -0
- data/fastlane/lib/fastlane/actions/splunkmint.rb +156 -0
- data/fastlane/lib/fastlane/actions/spm.rb +144 -0
- data/fastlane/lib/fastlane/actions/ssh.rb +157 -0
- data/fastlane/lib/fastlane/actions/supply.rb +14 -0
- data/fastlane/lib/fastlane/actions/swiftlint.rb +242 -0
- data/fastlane/lib/fastlane/actions/sync_code_signing.rb +114 -0
- data/fastlane/lib/fastlane/actions/team_id.rb +42 -0
- data/fastlane/lib/fastlane/actions/team_name.rb +42 -0
- data/fastlane/lib/fastlane/actions/testfairy.rb +284 -0
- data/fastlane/lib/fastlane/actions/testflight.rb +14 -0
- data/fastlane/lib/fastlane/actions/trainer.rb +49 -0
- data/fastlane/lib/fastlane/actions/tryouts.rb +148 -0
- data/fastlane/lib/fastlane/actions/twitter.rb +84 -0
- data/fastlane/lib/fastlane/actions/typetalk.rb +93 -0
- data/fastlane/lib/fastlane/actions/unlock_keychain.rb +132 -0
- data/fastlane/lib/fastlane/actions/update_app_group_identifiers.rb +88 -0
- data/fastlane/lib/fastlane/actions/update_app_identifier.rb +124 -0
- data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +223 -0
- data/fastlane/lib/fastlane/actions/update_fastlane.rb +158 -0
- data/fastlane/lib/fastlane/actions/update_icloud_container_identifiers.rb +96 -0
- data/fastlane/lib/fastlane/actions/update_info_plist.rb +143 -0
- data/fastlane/lib/fastlane/actions/update_keychain_access_groups.rb +91 -0
- data/fastlane/lib/fastlane/actions/update_plist.rb +115 -0
- data/fastlane/lib/fastlane/actions/update_project_code_signing.rb +76 -0
- data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +181 -0
- data/fastlane/lib/fastlane/actions/update_project_team.rb +95 -0
- data/fastlane/lib/fastlane/actions/update_urban_airship_configuration.rb +90 -0
- data/fastlane/lib/fastlane/actions/update_url_schemes.rb +112 -0
- 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 +232 -0
- data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +158 -0
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +71 -0
- data/fastlane/lib/fastlane/actions/upload_to_play_store.rb +80 -0
- data/fastlane/lib/fastlane/actions/upload_to_play_store_internal_app_sharing.rb +78 -0
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +126 -0
- data/fastlane/lib/fastlane/actions/validate_play_store_json_key.rb +100 -0
- data/fastlane/lib/fastlane/actions/verify_build.rb +199 -0
- data/fastlane/lib/fastlane/actions/verify_pod_keys.rb +67 -0
- data/fastlane/lib/fastlane/actions/verify_xcode.rb +159 -0
- data/fastlane/lib/fastlane/actions/version_bump_podspec.rb +105 -0
- data/fastlane/lib/fastlane/actions/version_get_podspec.rb +70 -0
- data/fastlane/lib/fastlane/actions/xcode_install.rb +112 -0
- data/fastlane/lib/fastlane/actions/xcode_select.rb +68 -0
- data/fastlane/lib/fastlane/actions/xcode_server_get_assets.rb +312 -0
- data/fastlane/lib/fastlane/actions/xcodebuild.rb +647 -0
- data/fastlane/lib/fastlane/actions/xcodes.rb +152 -0
- data/fastlane/lib/fastlane/actions/xcov.rb +71 -0
- data/fastlane/lib/fastlane/actions/xctool.rb +55 -0
- data/fastlane/lib/fastlane/actions/xcversion.rb +65 -0
- data/fastlane/lib/fastlane/actions/zip.rb +185 -0
- data/fastlane/lib/fastlane/auto_complete.rb +82 -0
- data/fastlane/lib/fastlane/boolean.rb +5 -0
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +215 -0
- data/fastlane/lib/fastlane/command_line_handler.rb +49 -0
- data/fastlane/lib/fastlane/commands_generator.rb +371 -0
- data/fastlane/lib/fastlane/configuration_helper.rb +26 -0
- data/fastlane/lib/fastlane/core_ext/bundler_monkey_patch.rb +14 -0
- data/fastlane/lib/fastlane/documentation/actions_list.rb +214 -0
- data/fastlane/lib/fastlane/documentation/docs_generator.rb +94 -0
- data/fastlane/lib/fastlane/documentation/markdown_docs_generator.rb +234 -0
- data/fastlane/lib/fastlane/environment_printer.rb +304 -0
- data/fastlane/lib/fastlane/erb_template_helper.rb +36 -0
- data/fastlane/lib/fastlane/fast_file.rb +464 -0
- data/fastlane/lib/fastlane/fastlane_require.rb +81 -0
- data/fastlane/lib/fastlane/features.rb +10 -0
- data/fastlane/lib/fastlane/helper/README.md +29 -0
- data/fastlane/lib/fastlane/helper/adb_helper.rb +66 -0
- data/fastlane/lib/fastlane/helper/dotenv_helper.rb +50 -0
- data/fastlane/lib/fastlane/helper/gem_helper.rb +26 -0
- data/fastlane/lib/fastlane/helper/git_helper.rb +166 -0
- data/fastlane/lib/fastlane/helper/gradle_helper.rb +62 -0
- data/fastlane/lib/fastlane/helper/lane_helper.rb +13 -0
- data/fastlane/lib/fastlane/helper/podspec_helper.rb +75 -0
- data/fastlane/lib/fastlane/helper/s3_client_helper.rb +78 -0
- data/fastlane/lib/fastlane/helper/sh_helper.rb +134 -0
- data/fastlane/lib/fastlane/helper/xcodebuild_formatter_helper.rb +9 -0
- data/fastlane/lib/fastlane/helper/xcodeproj_helper.rb +12 -0
- data/fastlane/lib/fastlane/helper/xcodes_helper.rb +28 -0
- data/fastlane/lib/fastlane/helper/xcversion_helper.rb +16 -0
- data/fastlane/lib/fastlane/junit_generator.rb +27 -0
- data/fastlane/lib/fastlane/lane.rb +97 -0
- data/fastlane/lib/fastlane/lane_list.rb +137 -0
- data/fastlane/lib/fastlane/lane_manager.rb +131 -0
- data/fastlane/lib/fastlane/lane_manager_base.rb +92 -0
- data/fastlane/lib/fastlane/markdown_table_formatter.rb +62 -0
- data/fastlane/lib/fastlane/new_action.rb +47 -0
- data/fastlane/lib/fastlane/notification/slack.rb +56 -0
- data/fastlane/lib/fastlane/one_off.rb +45 -0
- data/fastlane/lib/fastlane/other_action.rb +29 -0
- data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +54 -0
- data/fastlane/lib/fastlane/plugins/plugin_generator.rb +86 -0
- data/fastlane/lib/fastlane/plugins/plugin_generator_ui.rb +19 -0
- data/fastlane/lib/fastlane/plugins/plugin_info.rb +49 -0
- data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +158 -0
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +398 -0
- data/fastlane/lib/fastlane/plugins/plugin_search.rb +46 -0
- data/fastlane/lib/fastlane/plugins/plugin_update_manager.rb +70 -0
- data/fastlane/lib/fastlane/plugins/plugins.rb +12 -0
- data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +36 -0
- data/fastlane/lib/fastlane/plugins/template/.circleci/config.yml +43 -0
- data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +29 -0
- data/fastlane/lib/fastlane/plugins/template/.gitignore +12 -0
- data/fastlane/lib/fastlane/plugins/template/.rspec +5 -0
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +188 -0
- data/fastlane/lib/fastlane/plugins/template/.travis.yml +4 -0
- data/fastlane/lib/fastlane/plugins/template/Gemfile +6 -0
- data/fastlane/lib/fastlane/plugins/template/LICENSE.erb +21 -0
- data/fastlane/lib/fastlane/plugins/template/README.md.erb +52 -0
- data/fastlane/lib/fastlane/plugins/template/Rakefile +9 -0
- data/fastlane/lib/fastlane/plugins/template/fastlane/Fastfile.erb +3 -0
- data/fastlane/lib/fastlane/plugins/template/fastlane/Pluginfile.erb +1 -0
- data/fastlane/lib/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%/actions/%plugin_name%_action.rb.erb +47 -0
- data/fastlane/lib/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%/helper/%plugin_name%_helper.rb.erb +16 -0
- data/fastlane/lib/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%/version.rb.erb +5 -0
- data/fastlane/lib/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%.rb.erb +16 -0
- data/fastlane/lib/fastlane/plugins/template/spec/%plugin_name%_action_spec.rb.erb +9 -0
- data/fastlane/lib/fastlane/plugins/template/spec/spec_helper.rb.erb +15 -0
- data/fastlane/lib/fastlane/runner.rb +378 -0
- data/fastlane/lib/fastlane/server/action_command.rb +61 -0
- data/fastlane/lib/fastlane/server/action_command_return.rb +14 -0
- data/fastlane/lib/fastlane/server/command_executor.rb +7 -0
- data/fastlane/lib/fastlane/server/command_parser.rb +44 -0
- data/fastlane/lib/fastlane/server/control_command.rb +23 -0
- data/fastlane/lib/fastlane/server/json_return_value_processor.rb +72 -0
- data/fastlane/lib/fastlane/server/socket_server.rb +238 -0
- data/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb +101 -0
- data/fastlane/lib/fastlane/setup/setup.rb +368 -0
- data/fastlane/lib/fastlane/setup/setup_android.rb +97 -0
- data/fastlane/lib/fastlane/setup/setup_ios.rb +504 -0
- data/fastlane/lib/fastlane/shells.rb +6 -0
- data/fastlane/lib/fastlane/supported_platforms.rb +28 -0
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +480 -0
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +447 -0
- data/fastlane/lib/fastlane/swift_lane_manager.rb +304 -0
- data/fastlane/lib/fastlane/swift_runner_upgrader.rb +265 -0
- data/fastlane/lib/fastlane/tools.rb +50 -0
- data/fastlane/lib/fastlane/version.rb +6 -0
- data/fastlane/lib/fastlane.rb +53 -0
- data/fastlane/swift/Actions.swift +16 -0
- data/fastlane/swift/Appfile.swift +15 -0
- data/fastlane/swift/ArgumentProcessor.swift +89 -0
- data/fastlane/swift/Atomic.swift +150 -0
- data/fastlane/swift/ControlCommand.swift +74 -0
- data/fastlane/swift/Deliverfile.swift +20 -0
- data/fastlane/swift/DeliverfileProtocol.swift +267 -0
- data/fastlane/swift/Fastfile.swift +16 -0
- data/fastlane/swift/Fastlane.swift +13576 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +448 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +97 -0
- data/fastlane/swift/FastlaneSwiftRunner/README.txt +10 -0
- data/fastlane/swift/Gymfile.swift +20 -0
- data/fastlane/swift/GymfileProtocol.swift +211 -0
- data/fastlane/swift/LaneFileProtocol.swift +155 -0
- data/fastlane/swift/MainProcess.swift +79 -0
- data/fastlane/swift/Matchfile.swift +20 -0
- data/fastlane/swift/MatchfileProtocol.swift +211 -0
- data/fastlane/swift/OptionalConfigValue.swift +101 -0
- data/fastlane/swift/Plugins.swift +16 -0
- data/fastlane/swift/Precheckfile.swift +20 -0
- data/fastlane/swift/PrecheckfileProtocol.swift +55 -0
- data/fastlane/swift/RubyCommand.swift +157 -0
- data/fastlane/swift/RubyCommandable.swift +43 -0
- data/fastlane/swift/Runner.swift +279 -0
- data/fastlane/swift/RunnerArgument.swift +20 -0
- data/fastlane/swift/Scanfile.swift +20 -0
- data/fastlane/swift/ScanfileProtocol.swift +319 -0
- data/fastlane/swift/Screengrabfile.swift +20 -0
- data/fastlane/swift/ScreengrabfileProtocol.swift +99 -0
- data/fastlane/swift/Snapshotfile.swift +20 -0
- data/fastlane/swift/SnapshotfileProtocol.swift +207 -0
- data/fastlane/swift/SocketClient.swift +332 -0
- data/fastlane/swift/SocketClientDelegateProtocol.swift +21 -0
- data/fastlane/swift/SocketResponse.swift +84 -0
- data/fastlane/swift/formatting/Brewfile +1 -0
- data/fastlane/swift/formatting/Brewfile.lock.json +86 -0
- data/fastlane/swift/formatting/Rakefile +18 -0
- data/fastlane/swift/main.swift +47 -0
- data/fastlane/swift/upgrade_manifest.json +1 -0
- data/fastlane_core/README.md +80 -0
- data/fastlane_core/lib/assets/XMLTemplate.xml.erb +12 -0
- data/fastlane_core/lib/fastlane_core/analytics/action_completion_context.rb +34 -0
- data/fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb +38 -0
- data/fastlane_core/lib/fastlane_core/analytics/analytics_event_builder.rb +23 -0
- data/fastlane_core/lib/fastlane_core/analytics/analytics_ingester_client.rb +54 -0
- data/fastlane_core/lib/fastlane_core/analytics/analytics_session.rb +70 -0
- data/fastlane_core/lib/fastlane_core/analytics/app_identifier_guesser.rb +64 -0
- data/fastlane_core/lib/fastlane_core/android_package_name_guesser.rb +79 -0
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +192 -0
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +211 -0
- data/fastlane_core/lib/fastlane_core/clipboard.rb +20 -0
- data/fastlane_core/lib/fastlane_core/command_executor.rb +94 -0
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +108 -0
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +359 -0
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +338 -0
- data/fastlane_core/lib/fastlane_core/configuration/configuration_file.rb +182 -0
- data/fastlane_core/lib/fastlane_core/core_ext/cfpropertylist.rb +23 -0
- data/fastlane_core/lib/fastlane_core/core_ext/shellwords.rb +63 -0
- data/fastlane_core/lib/fastlane_core/core_ext/string.rb +17 -0
- data/fastlane_core/lib/fastlane_core/device_manager.rb +378 -0
- data/fastlane_core/lib/fastlane_core/env.rb +9 -0
- data/fastlane_core/lib/fastlane_core/fastlane_folder.rb +72 -0
- data/fastlane_core/lib/fastlane_core/fastlane_pty.rb +57 -0
- data/fastlane_core/lib/fastlane_core/feature/feature.rb +51 -0
- data/fastlane_core/lib/fastlane_core/features.rb +4 -0
- data/fastlane_core/lib/fastlane_core/globals.rb +27 -0
- data/fastlane_core/lib/fastlane_core/helper.rb +501 -0
- data/fastlane_core/lib/fastlane_core/ios_app_identifier_guesser.rb +112 -0
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +93 -0
- data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +53 -0
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +983 -0
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +128 -0
- data/fastlane_core/lib/fastlane_core/languages.rb +16 -0
- data/fastlane_core/lib/fastlane_core/module.rb +31 -0
- data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +56 -0
- data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +49 -0
- data/fastlane_core/lib/fastlane_core/print_table.rb +133 -0
- data/fastlane_core/lib/fastlane_core/project.rb +546 -0
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +126 -0
- data/fastlane_core/lib/fastlane_core/queue_worker.rb +49 -0
- data/fastlane_core/lib/fastlane_core/string_filters.rb +51 -0
- data/fastlane_core/lib/fastlane_core/swag.rb +85 -0
- data/fastlane_core/lib/fastlane_core/tag_version.rb +31 -0
- data/fastlane_core/lib/fastlane_core/test_parser.rb +107 -0
- data/fastlane_core/lib/fastlane_core/ui/disable_colors.rb +26 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_common_error.rb +19 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_crash.rb +11 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_error.rb +25 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_exception.rb +19 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_shell_error.rb +11 -0
- data/fastlane_core/lib/fastlane_core/ui/errors.rb +1 -0
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +342 -0
- data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +62 -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 +175 -0
- data/fastlane_core/lib/fastlane_core/ui/interface.rb +205 -0
- data/fastlane_core/lib/fastlane_core/ui/ui.rb +26 -0
- data/fastlane_core/lib/fastlane_core/update_checker/changelog.rb +37 -0
- data/fastlane_core/lib/fastlane_core/update_checker/update_checker.rb +109 -0
- data/fastlane_core/lib/fastlane_core.rb +48 -0
- data/frameit/README.md +17 -0
- data/frameit/lib/assets/empty.png +0 -0
- data/frameit/lib/frameit/commands_generator.rb +141 -0
- data/frameit/lib/frameit/config_parser.rb +136 -0
- data/frameit/lib/frameit/dependency_checker.rb +22 -0
- data/frameit/lib/frameit/device.rb +90 -0
- data/frameit/lib/frameit/device_types.rb +159 -0
- data/frameit/lib/frameit/editor.rb +558 -0
- data/frameit/lib/frameit/frame_downloader.rb +86 -0
- data/frameit/lib/frameit/mac_editor.rb +35 -0
- data/frameit/lib/frameit/module.rb +42 -0
- data/frameit/lib/frameit/offsets.rb +28 -0
- data/frameit/lib/frameit/options.rb +112 -0
- data/frameit/lib/frameit/runner.rb +97 -0
- data/frameit/lib/frameit/screenshot.rb +134 -0
- data/frameit/lib/frameit/strings_parser.rb +46 -0
- data/frameit/lib/frameit/template_finder.rb +45 -0
- data/frameit/lib/frameit/trim_box.rb +41 -0
- data/frameit/lib/frameit.rb +13 -0
- data/gym/README.md +17 -0
- data/gym/lib/assets/GymfileTemplate +13 -0
- data/gym/lib/assets/GymfileTemplate.swift +13 -0
- data/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh +61 -0
- data/gym/lib/gym/code_signing_mapping.rb +210 -0
- data/gym/lib/gym/commands_generator.rb +79 -0
- data/gym/lib/gym/detect_values.rb +206 -0
- data/gym/lib/gym/error_handler.rb +314 -0
- data/gym/lib/gym/generators/README.md +1 -0
- data/gym/lib/gym/generators/build_command_generator.rb +197 -0
- data/gym/lib/gym/generators/package_command_generator.rb +72 -0
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +238 -0
- data/gym/lib/gym/manager.rb +22 -0
- data/gym/lib/gym/module.rb +74 -0
- data/gym/lib/gym/options.rb +327 -0
- data/gym/lib/gym/runner.rb +376 -0
- data/gym/lib/gym/xcode.rb +27 -0
- data/gym/lib/gym/xcodebuild_fixes/README.md +9 -0
- data/gym/lib/gym/xcodebuild_fixes/generic_archive_fix.rb +35 -0
- data/gym/lib/gym.rb +9 -0
- data/match/README.md +17 -0
- data/match/lib/assets/MatchfileTemplate +11 -0
- data/match/lib/assets/MatchfileTemplate.swift +9 -0
- data/match/lib/assets/READMETemplate.md +59 -0
- data/match/lib/match/change_password.rb +55 -0
- data/match/lib/match/commands_generator.rb +192 -0
- data/match/lib/match/encryption/interface.rb +17 -0
- data/match/lib/match/encryption/openssl.rb +163 -0
- data/match/lib/match/encryption.rb +52 -0
- data/match/lib/match/generator.rb +124 -0
- data/match/lib/match/importer.rb +165 -0
- data/match/lib/match/migrate.rb +109 -0
- data/match/lib/match/module.rb +85 -0
- data/match/lib/match/nuke.rb +421 -0
- data/match/lib/match/options.rb +347 -0
- data/match/lib/match/runner.rb +472 -0
- data/match/lib/match/setup.rb +40 -0
- data/match/lib/match/spaceship_ensure.rb +103 -0
- data/match/lib/match/storage/git_storage.rb +254 -0
- data/match/lib/match/storage/gitlab/client.rb +102 -0
- data/match/lib/match/storage/gitlab/secure_file.rb +65 -0
- data/match/lib/match/storage/gitlab_secure_files.rb +182 -0
- data/match/lib/match/storage/google_cloud_storage.rb +383 -0
- data/match/lib/match/storage/interface.rb +119 -0
- data/match/lib/match/storage/s3_storage.rb +205 -0
- data/match/lib/match/storage.rb +50 -0
- data/match/lib/match/table_printer.rb +52 -0
- data/match/lib/match/utils.rb +88 -0
- data/match/lib/match.rb +14 -0
- data/pem/README.md +17 -0
- data/pem/lib/pem/commands_generator.rb +48 -0
- data/pem/lib/pem/manager.rb +136 -0
- data/pem/lib/pem/module.rb +19 -0
- data/pem/lib/pem/options.rb +112 -0
- data/pem/lib/pem.rb +4 -0
- data/pilot/README.md +17 -0
- data/pilot/lib/pilot/build_manager.rb +602 -0
- data/pilot/lib/pilot/commands_generator.rb +175 -0
- data/pilot/lib/pilot/manager.rb +95 -0
- data/pilot/lib/pilot/module.rb +11 -0
- data/pilot/lib/pilot/options.rb +336 -0
- data/pilot/lib/pilot/tester_exporter.rb +57 -0
- data/pilot/lib/pilot/tester_importer.rb +53 -0
- data/pilot/lib/pilot/tester_manager.rb +167 -0
- data/pilot/lib/pilot.rb +8 -0
- data/precheck/README.md +17 -0
- data/precheck/lib/assets/PrecheckfileTemplate +27 -0
- data/precheck/lib/assets/PrecheckfileTemplate.swift +19 -0
- data/precheck/lib/precheck/commands_generator.rb +75 -0
- data/precheck/lib/precheck/item_to_check.rb +58 -0
- data/precheck/lib/precheck/module.rb +23 -0
- data/precheck/lib/precheck/options.rb +110 -0
- data/precheck/lib/precheck/rule.rb +171 -0
- data/precheck/lib/precheck/rule_check_result.rb +19 -0
- data/precheck/lib/precheck/rule_processor.rb +265 -0
- data/precheck/lib/precheck/rules/abstract_text_match_rule.rb +80 -0
- data/precheck/lib/precheck/rules/all.rb +1 -0
- data/precheck/lib/precheck/rules/copyright_date_rule.rb +37 -0
- data/precheck/lib/precheck/rules/curse_words_rule.rb +62 -0
- data/precheck/lib/precheck/rules/custom_text_rule.rb +35 -0
- data/precheck/lib/precheck/rules/free_stuff_iap_rule.rb +31 -0
- data/precheck/lib/precheck/rules/future_functionality_rule.rb +33 -0
- data/precheck/lib/precheck/rules/negative_apple_sentiment_rule.rb +37 -0
- data/precheck/lib/precheck/rules/other_platforms_rule.rb +43 -0
- data/precheck/lib/precheck/rules/placeholder_words_rule.rb +31 -0
- data/precheck/lib/precheck/rules/rules_data/curse_word_hashes/en_us.txt +349 -0
- data/precheck/lib/precheck/rules/test_words_rule.rb +30 -0
- data/precheck/lib/precheck/rules/unreachable_urls_rule.rb +47 -0
- data/precheck/lib/precheck/runner.rb +202 -0
- data/precheck/lib/precheck.rb +3 -0
- data/produce/README.md +17 -0
- data/produce/lib/produce/available_default_languages.rb +51 -0
- data/produce/lib/produce/cloud_container.rb +82 -0
- data/produce/lib/produce/commands_generator.rb +337 -0
- data/produce/lib/produce/developer_center.rb +181 -0
- data/produce/lib/produce/group.rb +90 -0
- data/produce/lib/produce/itunes_connect.rb +139 -0
- data/produce/lib/produce/manager.rb +15 -0
- data/produce/lib/produce/merchant.rb +121 -0
- data/produce/lib/produce/module.rb +14 -0
- data/produce/lib/produce/options.rb +184 -0
- data/produce/lib/produce/service.rb +425 -0
- data/produce/lib/produce.rb +6 -0
- data/scan/README.md +17 -0
- data/scan/lib/assets/ScanfileTemplate +16 -0
- data/scan/lib/assets/ScanfileTemplate.swift +13 -0
- data/scan/lib/scan/commands_generator.rb +79 -0
- data/scan/lib/scan/detect_values.rb +244 -0
- data/scan/lib/scan/error_handler.rb +66 -0
- data/scan/lib/scan/manager.rb +38 -0
- data/scan/lib/scan/module.rb +37 -0
- data/scan/lib/scan/options.rb +541 -0
- data/scan/lib/scan/runner.rb +428 -0
- data/scan/lib/scan/slack_poster.rb +63 -0
- data/scan/lib/scan/test_command_generator.rb +262 -0
- data/scan/lib/scan/test_result_parser.rb +33 -0
- data/scan/lib/scan/xcpretty_reporter_options_generator.rb +85 -0
- data/scan/lib/scan.rb +10 -0
- data/screengrab/README.md +17 -0
- data/screengrab/lib/assets/ScreengrabfileTemplate +15 -0
- data/screengrab/lib/assets/ScreengrabfileTemplate.swift +15 -0
- data/screengrab/lib/screengrab/android_environment.rb +43 -0
- data/screengrab/lib/screengrab/commands_generator.rb +71 -0
- data/screengrab/lib/screengrab/dependency_checker.rb +38 -0
- data/screengrab/lib/screengrab/detect_values.rb +16 -0
- data/screengrab/lib/screengrab/module.rb +26 -0
- data/screengrab/lib/screengrab/options.rb +151 -0
- data/screengrab/lib/screengrab/page.html.erb +190 -0
- data/screengrab/lib/screengrab/reports_generator.rb +36 -0
- data/screengrab/lib/screengrab/runner.rb +452 -0
- data/screengrab/lib/screengrab/setup.rb +24 -0
- data/screengrab/lib/screengrab.rb +7 -0
- data/sigh/README.md +17 -0
- data/sigh/lib/assets/resign.sh +932 -0
- data/sigh/lib/sigh/commands_generator.rb +155 -0
- data/sigh/lib/sigh/download_all.rb +120 -0
- data/sigh/lib/sigh/local_manage.rb +145 -0
- data/sigh/lib/sigh/manager.rb +47 -0
- data/sigh/lib/sigh/module.rb +44 -0
- data/sigh/lib/sigh/options.rb +199 -0
- data/sigh/lib/sigh/repair.rb +34 -0
- data/sigh/lib/sigh/resign.rb +220 -0
- data/sigh/lib/sigh/runner.rb +412 -0
- data/sigh/lib/sigh.rb +4 -0
- data/snapshot/README.md +17 -0
- data/snapshot/lib/assets/SnapfileTemplate +38 -0
- data/snapshot/lib/assets/SnapfileTemplate.swift +42 -0
- data/snapshot/lib/assets/SnapshotHelper.swift +309 -0
- data/snapshot/lib/assets/SnapshotHelperXcode8.swift +172 -0
- data/snapshot/lib/snapshot/collector.rb +140 -0
- data/snapshot/lib/snapshot/commands_generator.rb +117 -0
- data/snapshot/lib/snapshot/dependency_checker.rb +69 -0
- data/snapshot/lib/snapshot/detect_values.rb +86 -0
- data/snapshot/lib/snapshot/error_handler.rb +24 -0
- data/snapshot/lib/snapshot/fixes/README.md +5 -0
- data/snapshot/lib/snapshot/fixes/hardware_keyboard_fix.rb +27 -0
- data/snapshot/lib/snapshot/fixes/simulator_shared_pasteboard.rb +16 -0
- data/snapshot/lib/snapshot/fixes/simulator_zoom_fix.rb +27 -0
- data/snapshot/lib/snapshot/latest_os_version.rb +34 -0
- data/snapshot/lib/snapshot/module.rb +44 -0
- data/snapshot/lib/snapshot/options.rb +326 -0
- data/snapshot/lib/snapshot/page.html.erb +285 -0
- data/snapshot/lib/snapshot/reports_generator.rb +154 -0
- data/snapshot/lib/snapshot/reset_simulators.rb +122 -0
- data/snapshot/lib/snapshot/runner.rb +146 -0
- data/snapshot/lib/snapshot/screenshot_flatten.rb +20 -0
- data/snapshot/lib/snapshot/screenshot_rotate.rb +36 -0
- data/snapshot/lib/snapshot/setup.rb +58 -0
- data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +64 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +219 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +220 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_xcode_8.rb +113 -0
- data/snapshot/lib/snapshot/test_command_generator.rb +157 -0
- data/snapshot/lib/snapshot/test_command_generator_base.rb +130 -0
- data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +70 -0
- data/snapshot/lib/snapshot/update.rb +38 -0
- data/snapshot/lib/snapshot.rb +19 -0
- data/spaceship/README.md +173 -0
- data/spaceship/lib/assets/displayFamilies.json +181 -0
- data/spaceship/lib/assets/languageMapping.json +306 -0
- data/spaceship/lib/assets/languageMappingReadable.json +30 -0
- data/spaceship/lib/spaceship/base.rb +310 -0
- data/spaceship/lib/spaceship/client.rb +988 -0
- data/spaceship/lib/spaceship/commands_generator.rb +55 -0
- data/spaceship/lib/spaceship/connect_api/api_client.rb +356 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +216 -0
- data/spaceship/lib/spaceship/connect_api/file_uploader.rb +99 -0
- data/spaceship/lib/spaceship/connect_api/model.rb +172 -0
- data/spaceship/lib/spaceship/connect_api/models/actor.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +147 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +482 -0
- data/spaceship/lib/spaceship/connect_api/models/app_category.rb +94 -0
- 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 +112 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +48 -0
- data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +135 -0
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +109 -0
- data/spaceship/lib/spaceship/connect_api/models/app_price.rb +22 -0
- data/spaceship/lib/spaceship/connect_api/models/app_price_point.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/app_price_tier.rb +12 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +189 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +169 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_attachment.rb +73 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +53 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +241 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +115 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_phased_release.rb +57 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_release_request.rb +12 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_submission.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_app_localization.rb +28 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_app_review_detail.rb +32 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_app_review_submission.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_build_localization.rb +20 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_build_metric.rb +24 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_feedback.rb +77 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +67 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_screenshot.rb +18 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +63 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_tester_metric.rb +44 -0
- data/spaceship/lib/spaceship/connect_api/models/build.rb +195 -0
- data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +69 -0
- data/spaceship/lib/spaceship/connect_api/models/build_bundle.rb +68 -0
- data/spaceship/lib/spaceship/connect_api/models/build_bundle_file_sizes.rb +34 -0
- data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +38 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +93 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +136 -0
- data/spaceship/lib/spaceship/connect_api/models/capabilities.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +110 -0
- data/spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb +43 -0
- data/spaceship/lib/spaceship/connect_api/models/custom_app_user.rb +41 -0
- data/spaceship/lib/spaceship/connect_api/models/device.rb +133 -0
- data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +43 -0
- data/spaceship/lib/spaceship/connect_api/models/pre_release_version.rb +20 -0
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +111 -0
- data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/resolution_center_message.rb +29 -0
- data/spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb +67 -0
- data/spaceship/lib/spaceship/connect_api/models/review_rejection.rb +19 -0
- data/spaceship/lib/spaceship/connect_api/models/review_submission.rb +86 -0
- data/spaceship/lib/spaceship/connect_api/models/review_submission_item.rb +40 -0
- data/spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb +67 -0
- data/spaceship/lib/spaceship/connect_api/models/territory.rb +28 -0
- data/spaceship/lib/spaceship/connect_api/models/user.rb +72 -0
- data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +96 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/client.rb +92 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +264 -0
- data/spaceship/lib/spaceship/connect_api/response.rb +86 -0
- data/spaceship/lib/spaceship/connect_api/spaceship.rb +102 -0
- data/spaceship/lib/spaceship/connect_api/testflight/client.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +513 -0
- data/spaceship/lib/spaceship/connect_api/token.rb +120 -0
- data/spaceship/lib/spaceship/connect_api/token_refresh_middleware.rb +24 -0
- data/spaceship/lib/spaceship/connect_api/tunes/client.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +1281 -0
- data/spaceship/lib/spaceship/connect_api/users/client.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/users/users.rb +135 -0
- data/spaceship/lib/spaceship/connect_api.rb +132 -0
- data/spaceship/lib/spaceship/du/du_client.rb +138 -0
- data/spaceship/lib/spaceship/du/upload_file.rb +58 -0
- data/spaceship/lib/spaceship/du/utilities.rb +99 -0
- data/spaceship/lib/spaceship/errors.rb +135 -0
- data/spaceship/lib/spaceship/globals.rb +21 -0
- data/spaceship/lib/spaceship/hashcash.rb +52 -0
- data/spaceship/lib/spaceship/helper/net_http_generic_request.rb +20 -0
- data/spaceship/lib/spaceship/helper/plist_middleware.rb +16 -0
- data/spaceship/lib/spaceship/helper/rels_middleware.rb +28 -0
- data/spaceship/lib/spaceship/launcher.rb +99 -0
- data/spaceship/lib/spaceship/module.rb +8 -0
- data/spaceship/lib/spaceship/playground.rb +75 -0
- data/spaceship/lib/spaceship/portal/app.rb +201 -0
- data/spaceship/lib/spaceship/portal/app_group.rb +73 -0
- data/spaceship/lib/spaceship/portal/app_service.rb +87 -0
- data/spaceship/lib/spaceship/portal/certificate.rb +366 -0
- data/spaceship/lib/spaceship/portal/cloud_container.rb +74 -0
- data/spaceship/lib/spaceship/portal/device.rb +191 -0
- data/spaceship/lib/spaceship/portal/invite.rb +53 -0
- data/spaceship/lib/spaceship/portal/key.rb +101 -0
- data/spaceship/lib/spaceship/portal/legacy_wrapper.rb +21 -0
- data/spaceship/lib/spaceship/portal/merchant.rb +86 -0
- data/spaceship/lib/spaceship/portal/passbook.rb +78 -0
- data/spaceship/lib/spaceship/portal/person.rb +62 -0
- data/spaceship/lib/spaceship/portal/persons.rb +67 -0
- data/spaceship/lib/spaceship/portal/portal.rb +17 -0
- data/spaceship/lib/spaceship/portal/portal_base.rb +16 -0
- data/spaceship/lib/spaceship/portal/portal_client.rb +862 -0
- data/spaceship/lib/spaceship/portal/provisioning_profile.rb +559 -0
- data/spaceship/lib/spaceship/portal/provisioning_profile_template.rb +52 -0
- data/spaceship/lib/spaceship/portal/spaceship.rb +154 -0
- data/spaceship/lib/spaceship/portal/ui/select_team.rb +116 -0
- data/spaceship/lib/spaceship/portal/website_push.rb +88 -0
- data/spaceship/lib/spaceship/provider.rb +13 -0
- data/spaceship/lib/spaceship/spaceauth_runner.rb +97 -0
- data/spaceship/lib/spaceship/stats_middleware.rb +65 -0
- data/spaceship/lib/spaceship/test_flight/app_test_info.rb +40 -0
- data/spaceship/lib/spaceship/test_flight/base.rb +39 -0
- data/spaceship/lib/spaceship/test_flight/beta_review_info.rb +19 -0
- data/spaceship/lib/spaceship/test_flight/build.rb +242 -0
- data/spaceship/lib/spaceship/test_flight/build_trains.rb +50 -0
- data/spaceship/lib/spaceship/test_flight/client.rb +361 -0
- data/spaceship/lib/spaceship/test_flight/export_compliance.rb +12 -0
- data/spaceship/lib/spaceship/test_flight/group.rb +131 -0
- data/spaceship/lib/spaceship/test_flight/test_info.rb +56 -0
- data/spaceship/lib/spaceship/test_flight/tester.rb +136 -0
- data/spaceship/lib/spaceship/test_flight.rb +10 -0
- data/spaceship/lib/spaceship/tunes/app_analytics.rb +168 -0
- data/spaceship/lib/spaceship/tunes/app_details.rb +147 -0
- data/spaceship/lib/spaceship/tunes/app_image.rb +51 -0
- data/spaceship/lib/spaceship/tunes/app_ratings.rb +58 -0
- data/spaceship/lib/spaceship/tunes/app_review.rb +55 -0
- data/spaceship/lib/spaceship/tunes/app_review_attachment.rb +49 -0
- data/spaceship/lib/spaceship/tunes/app_screenshot.rb +12 -0
- data/spaceship/lib/spaceship/tunes/app_status.rb +63 -0
- data/spaceship/lib/spaceship/tunes/app_submission.rb +161 -0
- data/spaceship/lib/spaceship/tunes/app_trailer.rb +64 -0
- data/spaceship/lib/spaceship/tunes/app_version.rb +970 -0
- data/spaceship/lib/spaceship/tunes/app_version_common.rb +35 -0
- data/spaceship/lib/spaceship/tunes/app_version_generated_promocodes.rb +28 -0
- data/spaceship/lib/spaceship/tunes/app_version_history.rb +52 -0
- data/spaceship/lib/spaceship/tunes/app_version_promocodes.rb +27 -0
- data/spaceship/lib/spaceship/tunes/app_version_ref.rb +15 -0
- data/spaceship/lib/spaceship/tunes/app_version_states_history.rb +27 -0
- data/spaceship/lib/spaceship/tunes/application.rb +453 -0
- data/spaceship/lib/spaceship/tunes/availability.rb +164 -0
- data/spaceship/lib/spaceship/tunes/b2b_organization.rb +50 -0
- data/spaceship/lib/spaceship/tunes/b2b_user.rb +30 -0
- data/spaceship/lib/spaceship/tunes/build.rb +263 -0
- data/spaceship/lib/spaceship/tunes/build_details.rb +184 -0
- data/spaceship/lib/spaceship/tunes/build_train.rb +181 -0
- data/spaceship/lib/spaceship/tunes/developer_response.rb +23 -0
- data/spaceship/lib/spaceship/tunes/device_type.rb +17 -0
- data/spaceship/lib/spaceship/tunes/display_family.rb +84 -0
- data/spaceship/lib/spaceship/tunes/errors.rb +17 -0
- data/spaceship/lib/spaceship/tunes/iap.rb +168 -0
- data/spaceship/lib/spaceship/tunes/iap_detail.rb +264 -0
- data/spaceship/lib/spaceship/tunes/iap_families.rb +68 -0
- data/spaceship/lib/spaceship/tunes/iap_family_details.rb +90 -0
- data/spaceship/lib/spaceship/tunes/iap_family_list.rb +28 -0
- data/spaceship/lib/spaceship/tunes/iap_list.rb +76 -0
- data/spaceship/lib/spaceship/tunes/iap_status.rb +56 -0
- data/spaceship/lib/spaceship/tunes/iap_subscription_pricing_info.rb +46 -0
- data/spaceship/lib/spaceship/tunes/iap_subscription_pricing_tier.rb +25 -0
- data/spaceship/lib/spaceship/tunes/iap_type.rb +45 -0
- data/spaceship/lib/spaceship/tunes/language_converter.rb +65 -0
- data/spaceship/lib/spaceship/tunes/language_item.rb +61 -0
- data/spaceship/lib/spaceship/tunes/legacy_wrapper.rb +13 -0
- data/spaceship/lib/spaceship/tunes/member.rb +84 -0
- data/spaceship/lib/spaceship/tunes/members.rb +35 -0
- data/spaceship/lib/spaceship/tunes/pricing_info.rb +42 -0
- data/spaceship/lib/spaceship/tunes/pricing_tier.rb +25 -0
- data/spaceship/lib/spaceship/tunes/sandbox_tester.rb +74 -0
- data/spaceship/lib/spaceship/tunes/spaceship.rb +39 -0
- data/spaceship/lib/spaceship/tunes/territory.rb +39 -0
- data/spaceship/lib/spaceship/tunes/transit_app_file.rb +23 -0
- data/spaceship/lib/spaceship/tunes/tunes.rb +34 -0
- data/spaceship/lib/spaceship/tunes/tunes_base.rb +17 -0
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +1705 -0
- data/spaceship/lib/spaceship/tunes/version_set.rb +26 -0
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +380 -0
- data/spaceship/lib/spaceship/ui.rb +27 -0
- data/spaceship/lib/spaceship/upgrade_2fa_later_client.rb +91 -0
- data/spaceship/lib/spaceship.rb +31 -0
- data/supply/README.md +17 -0
- data/supply/lib/supply/apk_listing.rb +14 -0
- data/supply/lib/supply/client.rb +587 -0
- data/supply/lib/supply/commands_generator.rb +68 -0
- data/supply/lib/supply/languages.rb +88 -0
- data/supply/lib/supply/listing.rb +32 -0
- data/supply/lib/supply/options.rb +344 -0
- data/supply/lib/supply/reader.rb +41 -0
- data/supply/lib/supply/release_listing.rb +18 -0
- data/supply/lib/supply/setup.rb +122 -0
- data/supply/lib/supply/uploader.rb +489 -0
- data/supply/lib/supply.rb +53 -0
- data/trainer/lib/assets/junit.xml.erb +28 -0
- data/trainer/lib/trainer/commands_generator.rb +51 -0
- data/trainer/lib/trainer/junit_generator.rb +31 -0
- data/trainer/lib/trainer/module.rb +10 -0
- data/trainer/lib/trainer/options.rb +66 -0
- data/trainer/lib/trainer/test_parser.rb +398 -0
- data/trainer/lib/trainer/xcresult.rb +403 -0
- data/trainer/lib/trainer.rb +7 -0
- metadata +1909 -0
@@ -0,0 +1,983 @@
|
|
1
|
+
require 'shellwords'
|
2
|
+
require 'tmpdir'
|
3
|
+
require 'fileutils'
|
4
|
+
require 'credentials_manager/account_manager'
|
5
|
+
require 'securerandom'
|
6
|
+
|
7
|
+
require_relative 'features'
|
8
|
+
require_relative 'helper'
|
9
|
+
require_relative 'fastlane_pty'
|
10
|
+
|
11
|
+
module FastlaneCore
|
12
|
+
# The TransporterInputError occurs when you passed wrong inputs to the {Deliver::ItunesTransporter}
|
13
|
+
class TransporterInputError < StandardError
|
14
|
+
end
|
15
|
+
# The TransporterTransferError occurs when some error happens
|
16
|
+
# while uploading or downloading something from/to iTC
|
17
|
+
class TransporterTransferError < StandardError
|
18
|
+
end
|
19
|
+
|
20
|
+
# Used internally
|
21
|
+
class TransporterRequiresApplicationSpecificPasswordError < StandardError
|
22
|
+
end
|
23
|
+
|
24
|
+
# Base class for executing the iTMSTransporter
|
25
|
+
class TransporterExecutor
|
26
|
+
ERROR_REGEX = />\s*ERROR:\s+(.+)/
|
27
|
+
WARNING_REGEX = />\s*WARN:\s+(.+)/
|
28
|
+
OUTPUT_REGEX = />\s+(.+)/
|
29
|
+
RETURN_VALUE_REGEX = />\sDBG-X:\sReturning\s+(\d+)/
|
30
|
+
|
31
|
+
# Matches a line in the iTMSTransporter provider table: "12 Initech Systems Inc LG89CQY559"
|
32
|
+
ITMS_PROVIDER_REGEX = /^\d+\s{2,}.+\s{2,}[^\s]+$/
|
33
|
+
|
34
|
+
SKIP_ERRORS = ["ERROR: An exception has occurred: Scheduling automatic restart in 1 minute"]
|
35
|
+
|
36
|
+
private_constant :ERROR_REGEX, :WARNING_REGEX, :OUTPUT_REGEX, :RETURN_VALUE_REGEX, :SKIP_ERRORS
|
37
|
+
|
38
|
+
def build_download_command(username, password, apple_id, destination = "/tmp", provider_short_name = "", jwt = nil)
|
39
|
+
not_implemented(__method__)
|
40
|
+
end
|
41
|
+
|
42
|
+
def build_provider_ids_command(username, password, jwt = nil, api_key = nil)
|
43
|
+
not_implemented(__method__)
|
44
|
+
end
|
45
|
+
|
46
|
+
def build_upload_command(username, password, source = "/tmp", provider_short_name = "", jwt = nil, platform = nil, api_key = nil)
|
47
|
+
not_implemented(__method__)
|
48
|
+
end
|
49
|
+
|
50
|
+
def build_verify_command(username, password, source = "/tmp", provider_short_name = "", **kwargs)
|
51
|
+
not_implemented(__method__)
|
52
|
+
end
|
53
|
+
|
54
|
+
def execute(command, hide_output)
|
55
|
+
if Helper.test?
|
56
|
+
yield(nil) if block_given?
|
57
|
+
return command
|
58
|
+
end
|
59
|
+
|
60
|
+
@errors = []
|
61
|
+
@warnings = []
|
62
|
+
@all_lines = []
|
63
|
+
|
64
|
+
if hide_output
|
65
|
+
# Show a one time message instead
|
66
|
+
UI.success("Waiting for App Store Connect transporter to be finished.")
|
67
|
+
UI.success("iTunes Transporter progress... this might take a few minutes...")
|
68
|
+
end
|
69
|
+
|
70
|
+
begin
|
71
|
+
exit_status = FastlaneCore::FastlanePty.spawn(command) do |command_stdout, command_stdin, pid|
|
72
|
+
begin
|
73
|
+
command_stdout.each do |line|
|
74
|
+
@all_lines << line
|
75
|
+
parse_line(line, hide_output) # this is where the parsing happens
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
rescue => ex
|
80
|
+
# FastlanePty adds exit_status on to StandardError so every error will have a status code
|
81
|
+
exit_status = ex.exit_status
|
82
|
+
@errors << ex.to_s
|
83
|
+
end
|
84
|
+
|
85
|
+
unless exit_status.zero?
|
86
|
+
@errors << "The call to the iTMSTransporter completed with a non-zero exit status: #{exit_status}. This indicates a failure."
|
87
|
+
end
|
88
|
+
|
89
|
+
if @warnings.count > 0
|
90
|
+
UI.important(@warnings.join("\n"))
|
91
|
+
end
|
92
|
+
|
93
|
+
if @errors.join("").include?("app-specific")
|
94
|
+
raise TransporterRequiresApplicationSpecificPasswordError
|
95
|
+
end
|
96
|
+
|
97
|
+
if @errors.count > 0 && @all_lines.count > 0
|
98
|
+
# Print out the last 15 lines, this is key for non-verbose mode
|
99
|
+
@all_lines.last(15).each do |line|
|
100
|
+
UI.important("[iTMSTransporter] #{line}")
|
101
|
+
end
|
102
|
+
UI.message("iTunes Transporter output above ^")
|
103
|
+
UI.error(@errors.join("\n"))
|
104
|
+
end
|
105
|
+
|
106
|
+
# this is to handle GitHub issue #1896, which occurs when an
|
107
|
+
# iTMSTransporter file transfer fails; iTMSTransporter will log an error
|
108
|
+
# but will then retry; if that retry is successful, we will see the error
|
109
|
+
# logged, but since the status code is zero, we want to return success
|
110
|
+
if @errors.count > 0 && exit_status.zero?
|
111
|
+
UI.important("Although errors occurred during execution of iTMSTransporter, it returned success status.")
|
112
|
+
end
|
113
|
+
|
114
|
+
yield(@all_lines) if block_given?
|
115
|
+
return exit_status.zero?
|
116
|
+
end
|
117
|
+
|
118
|
+
def displayable_errors
|
119
|
+
@errors.map { |error| "[Transporter Error Output]: #{error}" }.join("\n").gsub!(/"/, "")
|
120
|
+
end
|
121
|
+
|
122
|
+
def parse_provider_info(lines)
|
123
|
+
lines.map { |line| itms_provider_pair(line) }.compact.to_h
|
124
|
+
end
|
125
|
+
|
126
|
+
private
|
127
|
+
|
128
|
+
def itms_provider_pair(line)
|
129
|
+
line = line.strip
|
130
|
+
return nil unless line =~ ITMS_PROVIDER_REGEX
|
131
|
+
line.split(/\s{2,}/).drop(1)
|
132
|
+
end
|
133
|
+
|
134
|
+
def parse_line(line, hide_output)
|
135
|
+
# Taken from https://github.com/sshaw/itunes_store_transporter/blob/master/lib/itunes/store/transporter/output_parser.rb
|
136
|
+
|
137
|
+
output_done = false
|
138
|
+
|
139
|
+
re = Regexp.union(SKIP_ERRORS)
|
140
|
+
if line.match(re)
|
141
|
+
# Those lines will not be handled like errors or warnings
|
142
|
+
|
143
|
+
elsif line =~ ERROR_REGEX
|
144
|
+
@errors << $1
|
145
|
+
|
146
|
+
# Check if it's a login error
|
147
|
+
if $1.include?("Your Apple ID or password was entered incorrectly") ||
|
148
|
+
$1.include?("This Apple ID has been locked for security reasons")
|
149
|
+
|
150
|
+
unless Helper.test?
|
151
|
+
CredentialsManager::AccountManager.new(user: @user).invalid_credentials
|
152
|
+
UI.error("Please run this tool again to apply the new password")
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
output_done = true
|
157
|
+
elsif line =~ WARNING_REGEX
|
158
|
+
@warnings << $1
|
159
|
+
UI.important("[Transporter Warning Output]: #{$1}")
|
160
|
+
output_done = true
|
161
|
+
end
|
162
|
+
|
163
|
+
if line =~ RETURN_VALUE_REGEX
|
164
|
+
if $1.to_i != 0
|
165
|
+
UI.error("Transporter transfer failed.")
|
166
|
+
UI.important(@warnings.join("\n"))
|
167
|
+
UI.error(@errors.join("\n"))
|
168
|
+
UI.crash!("Return status of iTunes Transporter was #{$1}: #{@errors.join('\n')}")
|
169
|
+
else
|
170
|
+
UI.success("iTunes Transporter successfully finished its job")
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
if !hide_output && line =~ OUTPUT_REGEX
|
175
|
+
# General logging for debug purposes
|
176
|
+
unless output_done
|
177
|
+
UI.verbose("[Transporter]: #{$1}")
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
def file_upload_option(source)
|
183
|
+
ext = File.extname(source).downcase
|
184
|
+
is_asset_file_type = !File.directory?(source) && [".ipa", ".pkg", ".dmg", ".zip"].include?(ext)
|
185
|
+
|
186
|
+
if is_asset_file_type
|
187
|
+
return "-assetFile #{source.shellescape}"
|
188
|
+
else
|
189
|
+
return "-f #{source.shellescape}"
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
def additional_upload_parameters
|
194
|
+
# As Apple recommends in Transporter User Guide we shouldn't specify the -t transport parameter
|
195
|
+
# and instead allow Transporter to use automatic transport discovery
|
196
|
+
# to determine the best transport mode for packages.
|
197
|
+
# It became crucial after WWDC 2020 as it leaded to "Broken pipe (Write failed)" exception
|
198
|
+
# More information https://github.com/fastlane/fastlane/issues/16749
|
199
|
+
env_deliver_additional_params = ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"]
|
200
|
+
if env_deliver_additional_params.to_s.strip.empty?
|
201
|
+
return nil
|
202
|
+
end
|
203
|
+
|
204
|
+
deliver_additional_params = env_deliver_additional_params.to_s.strip
|
205
|
+
if deliver_additional_params.include?("-t ")
|
206
|
+
UI.important("Apple recommends you don’t specify the -t transport and instead allow Transporter to use automatic transport discovery to determine the best transport mode for your packages. For more information, please read Apple's Transporter User Guide 2.1: https://help.apple.com/itc/transporteruserguide/#/apdATD1E1288-D1E1A1303-D1E1288A1126")
|
207
|
+
end
|
208
|
+
return deliver_additional_params
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
# Generates commands and executes the altool.
|
213
|
+
class AltoolTransporterExecutor < TransporterExecutor
|
214
|
+
ERROR_REGEX = /\*\*\* Error:\s+(.+)/
|
215
|
+
|
216
|
+
private_constant :ERROR_REGEX
|
217
|
+
|
218
|
+
def execute(command, hide_output)
|
219
|
+
if Helper.test?
|
220
|
+
yield(nil) if block_given?
|
221
|
+
return command
|
222
|
+
end
|
223
|
+
|
224
|
+
@errors = []
|
225
|
+
@all_lines = []
|
226
|
+
|
227
|
+
if hide_output
|
228
|
+
# Show a one time message instead
|
229
|
+
UI.success("Waiting for App Store Connect transporter to be finished.")
|
230
|
+
UI.success("Application Loader progress... this might take a few minutes...")
|
231
|
+
end
|
232
|
+
|
233
|
+
begin
|
234
|
+
exit_status = FastlaneCore::FastlanePty.spawn(command) do |command_stdout, command_stdin, pid|
|
235
|
+
command_stdout.each do |line|
|
236
|
+
@all_lines << line
|
237
|
+
parse_line(line, hide_output) # this is where the parsing happens
|
238
|
+
end
|
239
|
+
end
|
240
|
+
rescue => ex
|
241
|
+
# FastlanePty adds exit_status on to StandardError so every error will have a status code
|
242
|
+
exit_status = ex.exit_status
|
243
|
+
@errors << ex.to_s
|
244
|
+
end
|
245
|
+
|
246
|
+
@errors << "The call to the altool completed with a non-zero exit status: #{exit_status}. This indicates a failure." unless exit_status.zero?
|
247
|
+
|
248
|
+
unless @errors.empty? || @all_lines.empty?
|
249
|
+
# Print the last lines that appear after the last error from the logs
|
250
|
+
# If error text is not detected, it will be 20 lines
|
251
|
+
# This is key for non-verbose mode
|
252
|
+
|
253
|
+
# The format of altool's result with error is like below
|
254
|
+
# > *** Error: Error uploading '...'.
|
255
|
+
# > *** Error: ...
|
256
|
+
# > {
|
257
|
+
# > NSLocalizedDescription = "...",
|
258
|
+
# > ...
|
259
|
+
# > }
|
260
|
+
# So this line tries to find the line which has "*** Error:" prefix from bottom of log
|
261
|
+
error_line_index = @all_lines.rindex { |line| ERROR_REGEX.match?(line) }
|
262
|
+
|
263
|
+
@all_lines[(error_line_index || -20)..-1].each do |line|
|
264
|
+
UI.important("[altool] #{line}")
|
265
|
+
end
|
266
|
+
UI.message("Application Loader output above ^")
|
267
|
+
@errors.each { |error| UI.error(error) }
|
268
|
+
end
|
269
|
+
|
270
|
+
yield(@all_lines) if block_given?
|
271
|
+
exit_status.zero?
|
272
|
+
end
|
273
|
+
|
274
|
+
def build_upload_command(username, password, source = "/tmp", provider_short_name = "", jwt = nil, platform = nil, api_key = nil)
|
275
|
+
use_api_key = !api_key.nil?
|
276
|
+
[
|
277
|
+
("API_PRIVATE_KEYS_DIR=#{api_key[:key_dir]}" if use_api_key),
|
278
|
+
"xcrun altool",
|
279
|
+
"--upload-app",
|
280
|
+
("-u #{username.shellescape}" unless use_api_key),
|
281
|
+
("-p #{password.shellescape}" unless use_api_key),
|
282
|
+
("--apiKey #{api_key[:key_id]}" if use_api_key),
|
283
|
+
("--apiIssuer #{api_key[:issuer_id]}" if use_api_key),
|
284
|
+
("--asc-provider #{provider_short_name}" unless use_api_key || provider_short_name.to_s.empty?),
|
285
|
+
platform_option(platform),
|
286
|
+
file_upload_option(source),
|
287
|
+
additional_upload_parameters,
|
288
|
+
"-k 100000"
|
289
|
+
].compact.join(' ')
|
290
|
+
end
|
291
|
+
|
292
|
+
def build_provider_ids_command(username, password, jwt = nil, api_key = nil)
|
293
|
+
use_api_key = !api_key.nil?
|
294
|
+
[
|
295
|
+
("API_PRIVATE_KEYS_DIR=#{api_key[:key_dir]}" if use_api_key),
|
296
|
+
"xcrun altool",
|
297
|
+
"--list-providers",
|
298
|
+
("-u #{username.shellescape}" unless use_api_key),
|
299
|
+
("-p #{password.shellescape}" unless use_api_key),
|
300
|
+
("--apiKey #{api_key[:key_id]}" if use_api_key),
|
301
|
+
("--apiIssuer #{api_key[:issuer_id]}" if use_api_key),
|
302
|
+
"--output-format json"
|
303
|
+
].compact.join(' ')
|
304
|
+
end
|
305
|
+
|
306
|
+
def build_download_command(username, password, apple_id, destination = "/tmp", provider_short_name = "", jwt = nil)
|
307
|
+
raise "This feature has not been implemented yet with altool for Xcode 14"
|
308
|
+
end
|
309
|
+
|
310
|
+
def build_verify_command(username, password, source = "/tmp", provider_short_name = "", **kwargs)
|
311
|
+
api_key = kwargs[:api_key]
|
312
|
+
platform = kwargs[:platform]
|
313
|
+
use_api_key = !api_key.nil?
|
314
|
+
[
|
315
|
+
("API_PRIVATE_KEYS_DIR=#{api_key[:key_dir]}" if use_api_key),
|
316
|
+
"xcrun altool",
|
317
|
+
"--validate-app",
|
318
|
+
("-u #{username.shellescape}" unless use_api_key),
|
319
|
+
("-p #{password.shellescape}" unless use_api_key),
|
320
|
+
("--apiKey #{api_key[:key_id]}" if use_api_key),
|
321
|
+
("--apiIssuer #{api_key[:issuer_id]}" if use_api_key),
|
322
|
+
("--asc-provider #{provider_short_name}" unless use_api_key || provider_short_name.to_s.empty?),
|
323
|
+
platform_option(platform),
|
324
|
+
file_upload_option(source)
|
325
|
+
].compact.join(' ')
|
326
|
+
end
|
327
|
+
|
328
|
+
def additional_upload_parameters
|
329
|
+
env_deliver_additional_params = ENV["DELIVER_ALTOOL_ADDITIONAL_UPLOAD_PARAMETERS"]
|
330
|
+
return nil if env_deliver_additional_params.to_s.strip.empty?
|
331
|
+
|
332
|
+
env_deliver_additional_params.to_s.strip
|
333
|
+
end
|
334
|
+
|
335
|
+
def handle_error(password)
|
336
|
+
UI.error("Could not download/upload from App Store Connect!")
|
337
|
+
end
|
338
|
+
|
339
|
+
def displayable_errors
|
340
|
+
@errors.map { |error| "[Application Loader Error Output]: #{error}" }.join("\n")
|
341
|
+
end
|
342
|
+
|
343
|
+
def parse_provider_info(lines)
|
344
|
+
# This tries parsing the provider id from altool output to detect provider list
|
345
|
+
provider_info = {}
|
346
|
+
json_body = lines[-2] # altool outputs result in second line from last
|
347
|
+
return provider_info if json_body.nil?
|
348
|
+
providers = JSON.parse(json_body)["providers"]
|
349
|
+
return provider_info if providers.nil?
|
350
|
+
providers.each do |provider|
|
351
|
+
provider_info[provider["ProviderName"]] = provider["ProviderShortname"]
|
352
|
+
end
|
353
|
+
provider_info
|
354
|
+
end
|
355
|
+
|
356
|
+
private
|
357
|
+
|
358
|
+
def file_upload_option(source)
|
359
|
+
"-f #{source.shellescape}"
|
360
|
+
end
|
361
|
+
|
362
|
+
def platform_option(platform)
|
363
|
+
"-t #{platform == 'osx' ? 'macos' : platform}"
|
364
|
+
end
|
365
|
+
|
366
|
+
def parse_line(line, hide_output)
|
367
|
+
output_done = false
|
368
|
+
|
369
|
+
if line =~ ERROR_REGEX
|
370
|
+
@errors << $1
|
371
|
+
output_done = true
|
372
|
+
end
|
373
|
+
|
374
|
+
unless hide_output
|
375
|
+
# General logging for debug purposes
|
376
|
+
unless output_done
|
377
|
+
UI.verbose("[altool]: #{line}")
|
378
|
+
end
|
379
|
+
end
|
380
|
+
end
|
381
|
+
end
|
382
|
+
|
383
|
+
# Generates commands and executes the iTMSTransporter through the shell script it provides by the same name
|
384
|
+
class ShellScriptTransporterExecutor < TransporterExecutor
|
385
|
+
def build_upload_command(username, password, source = "/tmp", provider_short_name = "", jwt = nil, platform = nil, api_key = nil)
|
386
|
+
use_jwt = !jwt.to_s.empty?
|
387
|
+
[
|
388
|
+
'"' + Helper.transporter_path + '"',
|
389
|
+
"-m upload",
|
390
|
+
("-u #{username.shellescape}" unless use_jwt),
|
391
|
+
("-p #{shell_escaped_password(password)}" unless use_jwt),
|
392
|
+
("-jwt #{jwt}" if use_jwt),
|
393
|
+
file_upload_option(source),
|
394
|
+
additional_upload_parameters, # that's here, because the user might overwrite the -t option
|
395
|
+
"-k 100000",
|
396
|
+
("-WONoPause true" if Helper.windows?), # Windows only: process instantly returns instead of waiting for key press
|
397
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?)
|
398
|
+
].compact.join(' ')
|
399
|
+
end
|
400
|
+
|
401
|
+
def build_download_command(username, password, apple_id, destination = "/tmp", provider_short_name = "", jwt = nil)
|
402
|
+
use_jwt = !jwt.to_s.empty?
|
403
|
+
[
|
404
|
+
'"' + Helper.transporter_path + '"',
|
405
|
+
"-m lookupMetadata",
|
406
|
+
("-u #{username.shellescape}" unless use_jwt),
|
407
|
+
("-p #{shell_escaped_password(password)}" unless use_jwt),
|
408
|
+
("-jwt #{jwt}" if use_jwt),
|
409
|
+
"-apple_id #{apple_id}",
|
410
|
+
"-destination '#{destination}'",
|
411
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?)
|
412
|
+
].compact.join(' ')
|
413
|
+
end
|
414
|
+
|
415
|
+
def build_provider_ids_command(username, password, jwt = nil, api_key = nil)
|
416
|
+
use_jwt = !jwt.to_s.empty?
|
417
|
+
[
|
418
|
+
'"' + Helper.transporter_path + '"',
|
419
|
+
'-m provider',
|
420
|
+
("-u \"#{username.shellescape}\"" unless use_jwt),
|
421
|
+
("-p #{shell_escaped_password(password)}" unless use_jwt),
|
422
|
+
("-jwt #{jwt}" if use_jwt)
|
423
|
+
].compact.join(' ')
|
424
|
+
end
|
425
|
+
|
426
|
+
def build_verify_command(username, password, source = "/tmp", provider_short_name = "", **kwargs)
|
427
|
+
jwt = kwargs[:jwt]
|
428
|
+
use_jwt = !jwt.to_s.empty?
|
429
|
+
[
|
430
|
+
'"' + Helper.transporter_path + '"',
|
431
|
+
'-m verify',
|
432
|
+
("-u #{username.shellescape}" unless use_jwt),
|
433
|
+
("-p #{shell_escaped_password(password)}" unless use_jwt),
|
434
|
+
("-jwt #{jwt}" if use_jwt),
|
435
|
+
"-f #{source.shellescape}",
|
436
|
+
("-WONoPause true" if Helper.windows?), # Windows only: process instantly returns instead of waiting for key press
|
437
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?)
|
438
|
+
].compact.join(' ')
|
439
|
+
end
|
440
|
+
|
441
|
+
def handle_error(password)
|
442
|
+
# rubocop:disable Style/CaseEquality
|
443
|
+
# rubocop:disable Style/YodaCondition
|
444
|
+
unless /^[0-9a-zA-Z\.\$\_\-]*$/ === password
|
445
|
+
UI.error([
|
446
|
+
"Password contains special characters, which may not be handled properly by iTMSTransporter.",
|
447
|
+
"If you experience problems uploading to App Store Connect, please consider changing your password to something with only alphanumeric characters."
|
448
|
+
].join(' '))
|
449
|
+
end
|
450
|
+
# rubocop:enable Style/CaseEquality
|
451
|
+
# rubocop:enable Style/YodaCondition
|
452
|
+
|
453
|
+
UI.error("Could not download/upload from App Store Connect! It's probably related to your password or your internet connection.")
|
454
|
+
end
|
455
|
+
|
456
|
+
private
|
457
|
+
|
458
|
+
def shell_escaped_password(password)
|
459
|
+
password = password.shellescape
|
460
|
+
unless Helper.windows?
|
461
|
+
# because the shell handles passwords with single-quotes incorrectly, use `gsub` to replace `shellescape`'d single-quotes of this form:
|
462
|
+
# \'
|
463
|
+
# with a sequence that wraps the escaped single-quote in double-quotes:
|
464
|
+
# '"\'"'
|
465
|
+
# this allows us to properly handle passwords with single-quotes in them
|
466
|
+
# background: https://stackoverflow.com/questions/1250079/how-to-escape-single-quotes-within-single-quoted-strings/1250098#1250098
|
467
|
+
password = password.gsub("\\'") do
|
468
|
+
# we use the 'do' version of gsub, because two-param version interprets the replace text as a pattern and does the wrong thing
|
469
|
+
"'\"\\'\"'"
|
470
|
+
end
|
471
|
+
|
472
|
+
# wrap the fully-escaped password in single quotes, since the transporter expects a escaped password string (which must be single-quoted for the shell's benefit)
|
473
|
+
password = "'" + password + "'"
|
474
|
+
end
|
475
|
+
return password
|
476
|
+
end
|
477
|
+
end
|
478
|
+
|
479
|
+
# Generates commands and executes the iTMSTransporter by invoking its Java app directly, to avoid the crazy parameter
|
480
|
+
# escaping problems in its accompanying shell script.
|
481
|
+
class JavaTransporterExecutor < TransporterExecutor
|
482
|
+
def build_upload_command(username, password, source = "/tmp", provider_short_name = "", jwt = nil, platform = nil, api_key = nil)
|
483
|
+
use_jwt = !jwt.to_s.empty?
|
484
|
+
if !Helper.user_defined_itms_path? && Helper.mac? && Helper.xcode_at_least?(11)
|
485
|
+
[
|
486
|
+
("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" unless use_jwt),
|
487
|
+
'xcrun iTMSTransporter',
|
488
|
+
'-m upload',
|
489
|
+
("-u #{username.shellescape}" unless use_jwt),
|
490
|
+
("-p @env:ITMS_TRANSPORTER_PASSWORD" unless use_jwt),
|
491
|
+
("-jwt #{jwt}" if use_jwt),
|
492
|
+
file_upload_option(source),
|
493
|
+
additional_upload_parameters, # that's here, because the user might overwrite the -t option
|
494
|
+
'-k 100000',
|
495
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?),
|
496
|
+
'2>&1' # cause stderr to be written to stdout
|
497
|
+
].compact.join(' ') # compact gets rid of the possibly nil ENV value
|
498
|
+
else
|
499
|
+
[
|
500
|
+
Helper.transporter_java_executable_path.shellescape,
|
501
|
+
"-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
|
502
|
+
'-XX:NewSize=2m',
|
503
|
+
'-Xms32m',
|
504
|
+
'-Xmx1024m',
|
505
|
+
'-Xms1024m',
|
506
|
+
'-Djava.awt.headless=true',
|
507
|
+
'-Dsun.net.http.retryPost=false',
|
508
|
+
java_code_option,
|
509
|
+
'-m upload',
|
510
|
+
("-u #{username.shellescape}" unless use_jwt),
|
511
|
+
("-p #{password.shellescape}" unless use_jwt),
|
512
|
+
("-jwt #{jwt}" if use_jwt),
|
513
|
+
file_upload_option(source),
|
514
|
+
additional_upload_parameters, # that's here, because the user might overwrite the -t option
|
515
|
+
'-k 100000',
|
516
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?),
|
517
|
+
'2>&1' # cause stderr to be written to stdout
|
518
|
+
].compact.join(' ') # compact gets rid of the possibly nil ENV value
|
519
|
+
end
|
520
|
+
end
|
521
|
+
|
522
|
+
def build_verify_command(username, password, source = "/tmp", provider_short_name = "", **kwargs)
|
523
|
+
jwt = kwargs[:jwt]
|
524
|
+
use_jwt = !jwt.to_s.empty?
|
525
|
+
if !Helper.user_defined_itms_path? && Helper.mac? && Helper.xcode_at_least?(11)
|
526
|
+
[
|
527
|
+
("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" unless use_jwt),
|
528
|
+
'xcrun iTMSTransporter',
|
529
|
+
'-m verify',
|
530
|
+
("-u #{username.shellescape}" unless use_jwt),
|
531
|
+
("-p @env:ITMS_TRANSPORTER_PASSWORD" unless use_jwt),
|
532
|
+
("-jwt #{jwt}" if use_jwt),
|
533
|
+
"-f #{source.shellescape}",
|
534
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?),
|
535
|
+
'2>&1' # cause stderr to be written to stdout
|
536
|
+
].compact.join(' ') # compact gets rid of the possibly nil ENV value
|
537
|
+
else
|
538
|
+
[
|
539
|
+
Helper.transporter_java_executable_path.shellescape,
|
540
|
+
"-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
|
541
|
+
'-XX:NewSize=2m',
|
542
|
+
'-Xms32m',
|
543
|
+
'-Xmx1024m',
|
544
|
+
'-Xms1024m',
|
545
|
+
'-Djava.awt.headless=true',
|
546
|
+
'-Dsun.net.http.retryPost=false',
|
547
|
+
java_code_option,
|
548
|
+
'-m verify',
|
549
|
+
("-u #{username.shellescape}" unless use_jwt),
|
550
|
+
("-p #{password.shellescape}" unless use_jwt),
|
551
|
+
("-jwt #{jwt}" if use_jwt),
|
552
|
+
"-f #{source.shellescape}",
|
553
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?),
|
554
|
+
'2>&1' # cause stderr to be written to stdout
|
555
|
+
].compact.join(' ') # compact gets rid of the possibly nil ENV value
|
556
|
+
end
|
557
|
+
end
|
558
|
+
|
559
|
+
def build_download_command(username, password, apple_id, destination = "/tmp", provider_short_name = "", jwt = nil)
|
560
|
+
use_jwt = !jwt.to_s.empty?
|
561
|
+
if !Helper.user_defined_itms_path? && Helper.mac? && Helper.xcode_at_least?(11)
|
562
|
+
[
|
563
|
+
("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" unless use_jwt),
|
564
|
+
'xcrun iTMSTransporter',
|
565
|
+
'-m lookupMetadata',
|
566
|
+
("-u #{username.shellescape}" unless use_jwt),
|
567
|
+
("-p @env:ITMS_TRANSPORTER_PASSWORD" unless use_jwt),
|
568
|
+
("-jwt #{jwt}" if use_jwt),
|
569
|
+
"-apple_id #{apple_id.shellescape}",
|
570
|
+
"-destination #{destination.shellescape}",
|
571
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?),
|
572
|
+
'2>&1' # cause stderr to be written to stdout
|
573
|
+
].compact.join(' ')
|
574
|
+
else
|
575
|
+
[
|
576
|
+
Helper.transporter_java_executable_path.shellescape,
|
577
|
+
"-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
|
578
|
+
'-XX:NewSize=2m',
|
579
|
+
'-Xms32m',
|
580
|
+
'-Xmx1024m',
|
581
|
+
'-Xms1024m',
|
582
|
+
'-Djava.awt.headless=true',
|
583
|
+
'-Dsun.net.http.retryPost=false',
|
584
|
+
java_code_option,
|
585
|
+
'-m lookupMetadata',
|
586
|
+
("-u #{username.shellescape}" unless use_jwt),
|
587
|
+
("-p #{password.shellescape}" unless use_jwt),
|
588
|
+
("-jwt #{jwt}" if use_jwt),
|
589
|
+
"-apple_id #{apple_id.shellescape}",
|
590
|
+
"-destination #{destination.shellescape}",
|
591
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?),
|
592
|
+
'2>&1' # cause stderr to be written to stdout
|
593
|
+
].compact.join(' ')
|
594
|
+
end
|
595
|
+
end
|
596
|
+
|
597
|
+
def build_provider_ids_command(username, password, jwt = nil, api_key = nil)
|
598
|
+
use_jwt = !jwt.to_s.empty?
|
599
|
+
if !Helper.user_defined_itms_path? && Helper.mac? && Helper.xcode_at_least?(11)
|
600
|
+
[
|
601
|
+
("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" unless use_jwt),
|
602
|
+
'xcrun iTMSTransporter',
|
603
|
+
'-m provider',
|
604
|
+
("-u #{username.shellescape}" unless use_jwt),
|
605
|
+
("-p @env:ITMS_TRANSPORTER_PASSWORD" unless use_jwt),
|
606
|
+
("-jwt #{jwt}" if use_jwt),
|
607
|
+
'2>&1' # cause stderr to be written to stdout
|
608
|
+
].compact.join(' ')
|
609
|
+
else
|
610
|
+
[
|
611
|
+
Helper.transporter_java_executable_path.shellescape,
|
612
|
+
"-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
|
613
|
+
'-XX:NewSize=2m',
|
614
|
+
'-Xms32m',
|
615
|
+
'-Xmx1024m',
|
616
|
+
'-Xms1024m',
|
617
|
+
'-Djava.awt.headless=true',
|
618
|
+
'-Dsun.net.http.retryPost=false',
|
619
|
+
java_code_option,
|
620
|
+
'-m provider',
|
621
|
+
("-u #{username.shellescape}" unless use_jwt),
|
622
|
+
("-p #{password.shellescape}" unless use_jwt),
|
623
|
+
("-jwt #{jwt}" if use_jwt),
|
624
|
+
'2>&1' # cause stderr to be written to stdout
|
625
|
+
].compact.join(' ')
|
626
|
+
end
|
627
|
+
end
|
628
|
+
|
629
|
+
def java_code_option
|
630
|
+
if Helper.mac? && Helper.xcode_at_least?(9)
|
631
|
+
return "-jar #{Helper.transporter_java_jar_path.shellescape}"
|
632
|
+
else
|
633
|
+
return "-classpath #{Helper.transporter_java_jar_path.shellescape} com.apple.transporter.Application"
|
634
|
+
end
|
635
|
+
end
|
636
|
+
|
637
|
+
def handle_error(password)
|
638
|
+
unless File.exist?(Helper.transporter_java_jar_path)
|
639
|
+
UI.error("The iTMSTransporter Java app was not found at '#{Helper.transporter_java_jar_path}'.")
|
640
|
+
UI.error("If you're using Xcode 6, please select the shell script executor by setting the environment variable "\
|
641
|
+
"FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT=1")
|
642
|
+
end
|
643
|
+
end
|
644
|
+
|
645
|
+
def execute(command, hide_output)
|
646
|
+
# The Java command needs to be run starting in a working directory in the iTMSTransporter
|
647
|
+
# file area. The shell script takes care of changing directories over to there, but we'll
|
648
|
+
# handle it manually here for this strategy.
|
649
|
+
FileUtils.cd(Helper.itms_path) do
|
650
|
+
return super(command, hide_output)
|
651
|
+
end
|
652
|
+
end
|
653
|
+
end
|
654
|
+
|
655
|
+
class ItunesTransporter
|
656
|
+
TWO_STEP_HOST_PREFIX = "deliver.appspecific"
|
657
|
+
|
658
|
+
# This will be called from the Deliverfile, and disables the logging of the transporter output
|
659
|
+
def self.hide_transporter_output
|
660
|
+
@hide_transporter_output = !FastlaneCore::Globals.verbose?
|
661
|
+
end
|
662
|
+
|
663
|
+
def self.hide_transporter_output?
|
664
|
+
@hide_transporter_output
|
665
|
+
end
|
666
|
+
|
667
|
+
# Returns a new instance of the iTunesTransporter.
|
668
|
+
# If no username or password given, it will be taken from
|
669
|
+
# the #{CredentialsManager::AccountManager}
|
670
|
+
# @param use_shell_script if true, forces use of the iTMSTransporter shell script.
|
671
|
+
# if false, allows a direct call to the iTMSTransporter Java app (preferred).
|
672
|
+
# see: https://github.com/fastlane/fastlane/pull/4003
|
673
|
+
# @param provider_short_name The provider short name to be given to the iTMSTransporter to identify the
|
674
|
+
# correct team for this work. The provider short name is usually your Developer
|
675
|
+
# Portal team ID, but in certain cases it is different!
|
676
|
+
# see: https://github.com/fastlane/fastlane/issues/1524#issuecomment-196370628
|
677
|
+
# for more information about how to use the iTMSTransporter to list your provider
|
678
|
+
# short names
|
679
|
+
def initialize(user = nil, password = nil, use_shell_script = false, provider_short_name = nil, jwt = nil, altool_compatible_command: false, api_key: nil)
|
680
|
+
# Xcode 6.x doesn't have the same iTMSTransporter Java setup as later Xcode versions, so
|
681
|
+
# we can't default to using the newer direct Java invocation strategy for those versions.
|
682
|
+
use_shell_script ||= Helper.is_mac? && Helper.xcode_version.start_with?('6.')
|
683
|
+
use_shell_script ||= Helper.windows?
|
684
|
+
use_shell_script ||= Feature.enabled?('FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT')
|
685
|
+
|
686
|
+
if jwt.to_s.empty?
|
687
|
+
@user = user
|
688
|
+
@password = password || load_password_for_transporter
|
689
|
+
end
|
690
|
+
|
691
|
+
@jwt = jwt
|
692
|
+
@api_key = api_key
|
693
|
+
|
694
|
+
if should_use_altool?(altool_compatible_command, use_shell_script)
|
695
|
+
UI.verbose("Using altool as transporter.")
|
696
|
+
@transporter_executor = AltoolTransporterExecutor.new
|
697
|
+
else
|
698
|
+
UI.verbose("Using iTMSTransporter as transporter.")
|
699
|
+
@transporter_executor = use_shell_script ? ShellScriptTransporterExecutor.new : JavaTransporterExecutor.new
|
700
|
+
end
|
701
|
+
|
702
|
+
@provider_short_name = provider_short_name
|
703
|
+
end
|
704
|
+
|
705
|
+
# Downloads the latest version of the app metadata package from iTC.
|
706
|
+
# @param app_id [Integer] The unique App ID
|
707
|
+
# @param dir [String] the path in which the package file should be stored
|
708
|
+
# @return (Bool) True if everything worked fine
|
709
|
+
# @raise [Deliver::TransporterTransferError] when something went wrong
|
710
|
+
# when transferring
|
711
|
+
def download(app_id, dir = nil)
|
712
|
+
dir ||= "/tmp"
|
713
|
+
|
714
|
+
password_placeholder = @jwt.nil? ? 'YourPassword' : nil
|
715
|
+
jwt_placeholder = @jwt.nil? ? nil : 'YourJWT'
|
716
|
+
|
717
|
+
UI.message("Going to download app metadata from App Store Connect")
|
718
|
+
command = @transporter_executor.build_download_command(@user, @password, app_id, dir, @provider_short_name, @jwt)
|
719
|
+
UI.verbose(@transporter_executor.build_download_command(@user, password_placeholder, app_id, dir, @provider_short_name, jwt_placeholder))
|
720
|
+
|
721
|
+
begin
|
722
|
+
result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
|
723
|
+
rescue TransporterRequiresApplicationSpecificPasswordError => ex
|
724
|
+
handle_two_step_failure(ex)
|
725
|
+
return download(app_id, dir)
|
726
|
+
end
|
727
|
+
|
728
|
+
return result if Helper.test?
|
729
|
+
|
730
|
+
itmsp_path = File.join(dir, "#{app_id}.itmsp")
|
731
|
+
successful = result && File.directory?(itmsp_path)
|
732
|
+
|
733
|
+
if successful
|
734
|
+
UI.success("✅ Successfully downloaded the latest package from App Store Connect to #{itmsp_path}")
|
735
|
+
else
|
736
|
+
handle_error(@password)
|
737
|
+
end
|
738
|
+
|
739
|
+
successful
|
740
|
+
end
|
741
|
+
|
742
|
+
# Uploads the modified package back to App Store Connect
|
743
|
+
# @param app_id [Integer] The unique App ID
|
744
|
+
# @param dir [String] the path in which the package file is located
|
745
|
+
# @param package_path [String] the path to the package file (used instead of app_id and dir)
|
746
|
+
# @param asset_path [String] the path to the ipa/dmg/pkg file (used instead of package_path if running on macOS)
|
747
|
+
# @return (Bool) True if everything worked fine
|
748
|
+
# @raise [Deliver::TransporterTransferError] when something went wrong
|
749
|
+
# when transferring
|
750
|
+
def upload(app_id = nil, dir = nil, package_path: nil, asset_path: nil, platform: nil)
|
751
|
+
raise "app_id and dir are required or package_path or asset_path is required" if (app_id.nil? || dir.nil?) && package_path.nil? && asset_path.nil?
|
752
|
+
|
753
|
+
# Transport can upload .ipa, .dmg, and .pkg files directly with -assetFile
|
754
|
+
# However, -assetFile requires -assetDescription if Linux or Windows
|
755
|
+
# This will give the asset directly if macOS and asset_path exists
|
756
|
+
# otherwise it will use the .itmsp package
|
757
|
+
|
758
|
+
force_itmsp = FastlaneCore::Env.truthy?("ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD")
|
759
|
+
can_use_asset_path = Helper.is_mac? && asset_path
|
760
|
+
|
761
|
+
actual_dir = if can_use_asset_path && !force_itmsp
|
762
|
+
# The asset gets deleted upon completion so copying to a temp directory
|
763
|
+
# (with randomized filename, for multibyte-mixed filename upload fails)
|
764
|
+
new_file_name = "#{SecureRandom.uuid}#{File.extname(asset_path)}"
|
765
|
+
tmp_asset_path = File.join(Dir.tmpdir, new_file_name)
|
766
|
+
FileUtils.cp(asset_path, tmp_asset_path)
|
767
|
+
tmp_asset_path
|
768
|
+
elsif package_path
|
769
|
+
package_path
|
770
|
+
else
|
771
|
+
File.join(dir, "#{app_id}.itmsp")
|
772
|
+
end
|
773
|
+
|
774
|
+
UI.message("Going to upload updated app to App Store Connect")
|
775
|
+
UI.success("This might take a few minutes. Please don't interrupt the script.")
|
776
|
+
|
777
|
+
password_placeholder = @jwt.nil? ? 'YourPassword' : nil
|
778
|
+
jwt_placeholder = @jwt.nil? ? nil : 'YourJWT'
|
779
|
+
|
780
|
+
# Handle AppStore Connect API
|
781
|
+
use_api_key = !@api_key.nil?
|
782
|
+
api_key_placeholder = use_api_key ? { key_id: "YourKeyID", issuer_id: "YourIssuerID", key_dir: "YourTmpP8KeyDir" } : nil
|
783
|
+
|
784
|
+
api_key = nil
|
785
|
+
api_key = api_key_with_p8_file_path(@api_key) if use_api_key
|
786
|
+
|
787
|
+
command = @transporter_executor.build_upload_command(@user, @password, actual_dir, @provider_short_name, @jwt, platform, api_key)
|
788
|
+
UI.verbose(@transporter_executor.build_upload_command(@user, password_placeholder, actual_dir, @provider_short_name, jwt_placeholder, platform, api_key_placeholder))
|
789
|
+
|
790
|
+
begin
|
791
|
+
result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
|
792
|
+
rescue TransporterRequiresApplicationSpecificPasswordError => ex
|
793
|
+
handle_two_step_failure(ex)
|
794
|
+
return upload(app_id, dir, package_path: package_path, asset_path: asset_path)
|
795
|
+
ensure
|
796
|
+
if use_api_key
|
797
|
+
FileUtils.rm_rf(api_key[:key_dir]) unless api_key.nil?
|
798
|
+
end
|
799
|
+
end
|
800
|
+
|
801
|
+
if result
|
802
|
+
UI.header("Successfully uploaded package to App Store Connect. It might take a few minutes until it's visible online.")
|
803
|
+
|
804
|
+
FileUtils.rm_rf(actual_dir) unless Helper.test? # we don't need the package any more, since the upload was successful
|
805
|
+
else
|
806
|
+
handle_error(@password)
|
807
|
+
end
|
808
|
+
|
809
|
+
return result
|
810
|
+
end
|
811
|
+
|
812
|
+
# Verifies the given binary with App Store Connect
|
813
|
+
# @param app_id [Integer] The unique App ID
|
814
|
+
# @param dir [String] the path in which the package file is located
|
815
|
+
# @param package_path [String] the path to the package file (used instead of app_id and dir)
|
816
|
+
# @return (Bool) True if everything worked fine
|
817
|
+
# @raise [Deliver::TransporterTransferError] when something went wrong
|
818
|
+
# when transferring
|
819
|
+
def verify(app_id = nil, dir = nil, package_path: nil, asset_path: nil, platform: nil)
|
820
|
+
raise "app_id and dir are required or package_path or asset_path is required" if (app_id.nil? || dir.nil?) && package_path.nil? && asset_path.nil?
|
821
|
+
|
822
|
+
force_itmsp = FastlaneCore::Env.truthy?("ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD")
|
823
|
+
can_use_asset_path = Helper.is_mac? && asset_path
|
824
|
+
|
825
|
+
actual_dir = if can_use_asset_path && !force_itmsp
|
826
|
+
# The asset gets deleted upon completion so copying to a temp directory
|
827
|
+
# (with randomized filename, for multibyte-mixed filename upload fails)
|
828
|
+
new_file_name = "#{SecureRandom.uuid}#{File.extname(asset_path)}"
|
829
|
+
tmp_asset_path = File.join(Dir.tmpdir, new_file_name)
|
830
|
+
FileUtils.cp(asset_path, tmp_asset_path)
|
831
|
+
tmp_asset_path
|
832
|
+
elsif package_path
|
833
|
+
package_path
|
834
|
+
else
|
835
|
+
File.join(dir, "#{app_id}.itmsp")
|
836
|
+
end
|
837
|
+
|
838
|
+
password_placeholder = @jwt.nil? ? 'YourPassword' : nil
|
839
|
+
jwt_placeholder = @jwt.nil? ? nil : 'YourJWT'
|
840
|
+
|
841
|
+
# Handle AppStore Connect API
|
842
|
+
use_api_key = !@api_key.nil?
|
843
|
+
|
844
|
+
# Masking credentials for verbose outputs
|
845
|
+
api_key_placeholder = use_api_key ? { key_id: "YourKeyID", issuer_id: "YourIssuerID", key_dir: "YourTmpP8KeyDir" } : nil
|
846
|
+
|
847
|
+
api_key = api_key_with_p8_file_path(@api_key) if use_api_key
|
848
|
+
|
849
|
+
command = @transporter_executor.build_verify_command(@user, @password, actual_dir, @provider_short_name, jwt: @jwt, platform: platform, api_key: api_key)
|
850
|
+
UI.verbose(@transporter_executor.build_verify_command(@user, password_placeholder, actual_dir, @provider_short_name, jwt: jwt_placeholder, platform: platform, api_key: api_key_placeholder))
|
851
|
+
|
852
|
+
begin
|
853
|
+
result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
|
854
|
+
rescue TransporterRequiresApplicationSpecificPasswordError => ex
|
855
|
+
handle_two_step_failure(ex)
|
856
|
+
return verify(app_id, dir, package_path: package_path)
|
857
|
+
end
|
858
|
+
|
859
|
+
if result
|
860
|
+
UI.header("Successfully verified package on App Store Connect")
|
861
|
+
|
862
|
+
FileUtils.rm_rf(actual_dir) unless Helper.test? # we don't need the package any more, since the upload was successful
|
863
|
+
else
|
864
|
+
handle_error(@password)
|
865
|
+
end
|
866
|
+
|
867
|
+
return result
|
868
|
+
end
|
869
|
+
|
870
|
+
def displayable_errors
|
871
|
+
@transporter_executor.displayable_errors
|
872
|
+
end
|
873
|
+
|
874
|
+
def provider_ids
|
875
|
+
password_placeholder = @jwt.nil? ? 'YourPassword' : nil
|
876
|
+
jwt_placeholder = @jwt.nil? ? nil : 'YourJWT'
|
877
|
+
|
878
|
+
# Handle AppStore Connect API
|
879
|
+
use_api_key = !@api_key.nil?
|
880
|
+
api_key_placeholder = use_api_key ? { key_id: "YourKeyID", issuer_id: "YourIssuerID", key_dir: "YourTmpP8KeyDir" } : nil
|
881
|
+
|
882
|
+
api_key = nil
|
883
|
+
api_key = api_key_with_p8_file_path(@api_key) if use_api_key
|
884
|
+
|
885
|
+
command = @transporter_executor.build_provider_ids_command(@user, @password, @jwt, api_key)
|
886
|
+
UI.verbose(@transporter_executor.build_provider_ids_command(@user, password_placeholder, jwt_placeholder, api_key_placeholder))
|
887
|
+
|
888
|
+
lines = []
|
889
|
+
begin
|
890
|
+
result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?) { |xs| lines = xs }
|
891
|
+
return result if Helper.test?
|
892
|
+
rescue TransporterRequiresApplicationSpecificPasswordError => ex
|
893
|
+
handle_two_step_failure(ex)
|
894
|
+
return provider_ids
|
895
|
+
ensure
|
896
|
+
if use_api_key
|
897
|
+
FileUtils.rm_rf(api_key[:key_dir]) unless api_key.nil?
|
898
|
+
end
|
899
|
+
end
|
900
|
+
|
901
|
+
@transporter_executor.parse_provider_info(lines)
|
902
|
+
end
|
903
|
+
|
904
|
+
private
|
905
|
+
|
906
|
+
TWO_FACTOR_ENV_VARIABLE = "FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD"
|
907
|
+
|
908
|
+
# Create .p8 file from api_key and provide api key info which contains .p8 file path
|
909
|
+
def api_key_with_p8_file_path(original_api_key)
|
910
|
+
api_key = original_api_key.dup
|
911
|
+
api_key[:key_dir] = Dir.mktmpdir("deliver-")
|
912
|
+
# Specified p8 needs to be generated to call altool
|
913
|
+
File.open(File.join(api_key[:key_dir], "AuthKey_#{api_key[:key_id]}.p8"), "wb") do |p8|
|
914
|
+
p8.write(api_key[:key])
|
915
|
+
end
|
916
|
+
api_key
|
917
|
+
end
|
918
|
+
|
919
|
+
# Returns whether altool should be used or ItunesTransporter should be used
|
920
|
+
def should_use_altool?(altool_compatible_command, use_shell_script)
|
921
|
+
# Xcode 14 no longer supports iTMSTransporter. Use altool instead
|
922
|
+
!use_shell_script && altool_compatible_command && !Helper.user_defined_itms_path? && Helper.mac? && Helper.xcode_at_least?(14)
|
923
|
+
end
|
924
|
+
|
925
|
+
# Returns the password to be used with the transporter
|
926
|
+
def load_password_for_transporter
|
927
|
+
# 3 different sources for the password
|
928
|
+
# 1) ENV variable for application specific password
|
929
|
+
if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0
|
930
|
+
UI.message("Fetching password for transporter from environment variable named `#{TWO_FACTOR_ENV_VARIABLE}`")
|
931
|
+
return ENV[TWO_FACTOR_ENV_VARIABLE]
|
932
|
+
end
|
933
|
+
# 2) TWO_STEP_HOST_PREFIX from keychain
|
934
|
+
account_manager = CredentialsManager::AccountManager.new(user: @user,
|
935
|
+
prefix: TWO_STEP_HOST_PREFIX,
|
936
|
+
note: "application-specific")
|
937
|
+
password = account_manager.password(ask_if_missing: false)
|
938
|
+
return password if password.to_s.length > 0
|
939
|
+
# 3) standard iTC password
|
940
|
+
account_manager = CredentialsManager::AccountManager.new(user: @user)
|
941
|
+
return account_manager.password(ask_if_missing: true)
|
942
|
+
end
|
943
|
+
|
944
|
+
# Tells the user how to get an application specific password
|
945
|
+
def handle_two_step_failure(ex)
|
946
|
+
if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0
|
947
|
+
# Password provided, however we already used it
|
948
|
+
UI.error("")
|
949
|
+
UI.error("Application specific password you provided using")
|
950
|
+
UI.error("environment variable #{TWO_FACTOR_ENV_VARIABLE}")
|
951
|
+
UI.error("is invalid, please make sure it's correct")
|
952
|
+
UI.error("")
|
953
|
+
UI.user_error!("Invalid application specific password provided")
|
954
|
+
end
|
955
|
+
|
956
|
+
a = CredentialsManager::AccountManager.new(user: @user,
|
957
|
+
prefix: TWO_STEP_HOST_PREFIX,
|
958
|
+
note: "application-specific")
|
959
|
+
if a.password(ask_if_missing: false).to_s.length > 0
|
960
|
+
# user already entered one.. delete the old one
|
961
|
+
UI.error("Application specific password seems wrong")
|
962
|
+
UI.error("Please make sure to follow the instructions")
|
963
|
+
a.remove_from_keychain
|
964
|
+
end
|
965
|
+
UI.error("")
|
966
|
+
UI.error("Your account has 2 step verification enabled")
|
967
|
+
UI.error("Please go to https://appleid.apple.com/account/manage")
|
968
|
+
UI.error("and generate an application specific password for")
|
969
|
+
UI.error("the iTunes Transporter, which is used to upload builds")
|
970
|
+
UI.error("")
|
971
|
+
UI.error("To set the application specific password on a CI machine using")
|
972
|
+
UI.error("an environment variable, you can set the")
|
973
|
+
UI.error("#{TWO_FACTOR_ENV_VARIABLE} variable")
|
974
|
+
@password = a.password(ask_if_missing: true) # to ask the user for the missing value
|
975
|
+
|
976
|
+
return true
|
977
|
+
end
|
978
|
+
|
979
|
+
def handle_error(password)
|
980
|
+
@transporter_executor.handle_error(password)
|
981
|
+
end
|
982
|
+
end
|
983
|
+
end
|