fastlane_iac_publish 0.1.0
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 +195 -0
- data/bin/bin-proxy +19 -0
- data/bin/fastlane +23 -0
- data/cert/README.md +17 -0
- data/cert/lib/cert.rb +4 -0
- data/cert/lib/cert/commands_generator.rb +59 -0
- data/cert/lib/cert/module.rb +14 -0
- data/cert/lib/cert/options.rb +92 -0
- data/cert/lib/cert/runner.rb +203 -0
- data/credentials_manager/README.md +64 -0
- data/credentials_manager/lib/credentials_manager.rb +7 -0
- data/credentials_manager/lib/credentials_manager/account_manager.rb +157 -0
- data/credentials_manager/lib/credentials_manager/appfile_config.rb +192 -0
- data/credentials_manager/lib/credentials_manager/cli.rb +67 -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 +7 -0
- data/deliver/lib/assets/summary.html.erb +299 -0
- data/deliver/lib/deliver.rb +15 -0
- data/deliver/lib/deliver/app_screenshot.rb +352 -0
- data/deliver/lib/deliver/commands_generator.rb +186 -0
- data/deliver/lib/deliver/detect_values.rb +93 -0
- data/deliver/lib/deliver/download_screenshots.rb +49 -0
- data/deliver/lib/deliver/generate_summary.rb +13 -0
- data/deliver/lib/deliver/html_generator.rb +71 -0
- data/deliver/lib/deliver/loader.rb +56 -0
- data/deliver/lib/deliver/module.rb +16 -0
- data/deliver/lib/deliver/options.rb +419 -0
- data/deliver/lib/deliver/runner.rb +202 -0
- data/deliver/lib/deliver/setup.rb +135 -0
- data/deliver/lib/deliver/submit_for_review.rb +122 -0
- data/deliver/lib/deliver/upload_assets.rb +27 -0
- data/deliver/lib/deliver/upload_metadata.rb +391 -0
- data/deliver/lib/deliver/upload_price_tier.rb +23 -0
- data/deliver/lib/deliver/upload_screenshots.rb +158 -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 +23 -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 +23 -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.rb +50 -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 +3 -0
- data/fastlane/lib/fastlane/actions/actions_helper.rb +162 -0
- data/fastlane/lib/fastlane/actions/adb.rb +78 -0
- data/fastlane/lib/fastlane/actions/adb_devices.rb +71 -0
- data/fastlane/lib/fastlane/actions/add_extra_platforms.rb +45 -0
- data/fastlane/lib/fastlane/actions/add_git_tag.rb +122 -0
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +193 -0
- data/fastlane/lib/fastlane/actions/appaloosa.rb +266 -0
- data/fastlane/lib/fastlane/actions/appetize.rb +188 -0
- data/fastlane/lib/fastlane/actions/appetize_viewing_url_generator.rb +146 -0
- data/fastlane/lib/fastlane/actions/appium.rb +206 -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 +105 -0
- data/fastlane/lib/fastlane/actions/artifactory.rb +157 -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 +155 -0
- data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +107 -0
- data/fastlane/lib/fastlane/actions/build_android_app.rb +14 -0
- data/fastlane/lib/fastlane/actions/build_app.rb +14 -0
- data/fastlane/lib/fastlane/actions/build_ios_app.rb +151 -0
- data/fastlane/lib/fastlane/actions/bundle_install.rb +156 -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 +215 -0
- data/fastlane/lib/fastlane/actions/cert.rb +14 -0
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +197 -0
- data/fastlane/lib/fastlane/actions/chatwork.rb +94 -0
- data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +53 -0
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +68 -0
- data/fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb +52 -0
- data/fastlane/lib/fastlane/actions/clear_derived_data.rb +70 -0
- data/fastlane/lib/fastlane/actions/clipboard.rb +52 -0
- data/fastlane/lib/fastlane/actions/cloc.rb +89 -0
- data/fastlane/lib/fastlane/actions/cocoapods.rb +148 -0
- data/fastlane/lib/fastlane/actions/commit_github_file.rb +186 -0
- data/fastlane/lib/fastlane/actions/commit_version_bump.rb +301 -0
- data/fastlane/lib/fastlane/actions/copy_artifacts.rb +114 -0
- data/fastlane/lib/fastlane/actions/crashlytics.rb +203 -0
- data/fastlane/lib/fastlane/actions/create_app_on_managed_play_store.rb +174 -0
- data/fastlane/lib/fastlane/actions/create_app_online.rb +75 -0
- data/fastlane/lib/fastlane/actions/create_keychain.rb +173 -0
- data/fastlane/lib/fastlane/actions/create_pull_request.rb +190 -0
- data/fastlane/lib/fastlane/actions/danger.rb +124 -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 +210 -0
- data/fastlane/lib/fastlane/actions/device_grid/README.md +157 -0
- data/fastlane/lib/fastlane/actions/docs/build_ios_app.md +245 -0
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +259 -0
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +363 -0
- data/fastlane/lib/fastlane/actions/docs/check_app_store_metadata.md +103 -0
- data/fastlane/lib/fastlane/actions/docs/create_app_online.md +282 -0
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +330 -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 +479 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +730 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +162 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +231 -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_dsyms.rb +266 -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_git_branch.rb +69 -0
- data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +81 -0
- data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +135 -0
- data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +97 -0
- data/fastlane/lib/fastlane/actions/environment_variable.rb +77 -0
- data/fastlane/lib/fastlane/actions/erb.rb +88 -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 +63 -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 +76 -0
- data/fastlane/lib/fastlane/actions/get_github_release.rb +163 -0
- data/fastlane/lib/fastlane/actions/get_info_plist_value.rb +78 -0
- data/fastlane/lib/fastlane/actions/get_ipa_info_plist_value.rb +82 -0
- data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +120 -0
- data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +100 -0
- data/fastlane/lib/fastlane/actions/get_push_certificate.rb +87 -0
- data/fastlane/lib/fastlane/actions/get_version_number.rb +170 -0
- data/fastlane/lib/fastlane/actions/git_add.rb +93 -0
- data/fastlane/lib/fastlane/actions/git_branch.rb +58 -0
- data/fastlane/lib/fastlane/actions/git_commit.rb +80 -0
- data/fastlane/lib/fastlane/actions/git_pull.rb +53 -0
- data/fastlane/lib/fastlane/actions/git_submodule_update.rb +52 -0
- data/fastlane/lib/fastlane/actions/git_tag_exists.rb +74 -0
- data/fastlane/lib/fastlane/actions/github_api.rb +262 -0
- data/fastlane/lib/fastlane/actions/google_play_track_version_codes.rb +73 -0
- data/fastlane/lib/fastlane/actions/gradle.rb +249 -0
- data/fastlane/lib/fastlane/actions/gym.rb +14 -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 +406 -0
- data/fastlane/lib/fastlane/actions/ifttt.rb +96 -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 +71 -0
- data/fastlane/lib/fastlane/actions/increment_build_number.rb +117 -0
- data/fastlane/lib/fastlane/actions/increment_version_number.rb +177 -0
- data/fastlane/lib/fastlane/actions/install_on_device.rb +95 -0
- data/fastlane/lib/fastlane/actions/install_provisioning_profile.rb +58 -0
- data/fastlane/lib/fastlane/actions/install_xcode_plugin.rb +91 -0
- data/fastlane/lib/fastlane/actions/installr.rb +132 -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 +56 -0
- data/fastlane/lib/fastlane/actions/jira.rb +115 -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 +51 -0
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +134 -0
- data/fastlane/lib/fastlane/actions/lcov.rb +102 -0
- data/fastlane/lib/fastlane/actions/mailgun.rb +197 -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/min_fastlane_version.rb +57 -0
- data/fastlane/lib/fastlane/actions/modify_services.rb +173 -0
- data/fastlane/lib/fastlane/actions/nexus_upload.rb +230 -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 +269 -0
- data/fastlane/lib/fastlane/actions/onesignal.rb +156 -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 +183 -0
- data/fastlane/lib/fastlane/actions/pod_push.rb +145 -0
- data/fastlane/lib/fastlane/actions/podio_item.rb +217 -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 +119 -0
- data/fastlane/lib/fastlane/actions/push_git_tags.rb +76 -0
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +127 -0
- data/fastlane/lib/fastlane/actions/puts.rb +68 -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 +110 -0
- data/fastlane/lib/fastlane/actions/register_devices.rb +160 -0
- data/fastlane/lib/fastlane/actions/reset_git_repo.rb +121 -0
- data/fastlane/lib/fastlane/actions/reset_simulator_contents.rb +92 -0
- data/fastlane/lib/fastlane/actions/resign.rb +132 -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 +74 -0
- data/fastlane/lib/fastlane/actions/ruby_version.rb +56 -0
- data/fastlane/lib/fastlane/actions/run_tests.rb +131 -0
- data/fastlane/lib/fastlane/actions/s3.rb +460 -0
- data/fastlane/lib/fastlane/actions/say.rb +56 -0
- data/fastlane/lib/fastlane/actions/scan.rb +14 -0
- data/fastlane/lib/fastlane/actions/scp.rb +114 -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 +172 -0
- data/fastlane/lib/fastlane/actions/set_github_release.rb +274 -0
- data/fastlane/lib/fastlane/actions/set_info_plist_value.rb +92 -0
- data/fastlane/lib/fastlane/actions/set_pod_key.rb +78 -0
- data/fastlane/lib/fastlane/actions/setup_ci.rb +121 -0
- data/fastlane/lib/fastlane/actions/setup_circle_ci.rb +58 -0
- data/fastlane/lib/fastlane/actions/setup_jenkins.rb +193 -0
- data/fastlane/lib/fastlane/actions/setup_travis.rb +57 -0
- data/fastlane/lib/fastlane/actions/sh.rb +71 -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 +288 -0
- data/fastlane/lib/fastlane/actions/slather.rb +314 -0
- data/fastlane/lib/fastlane/actions/snapshot.rb +14 -0
- data/fastlane/lib/fastlane/actions/sonar.rb +138 -0
- data/fastlane/lib/fastlane/actions/spaceship_logs.rb +135 -0
- data/fastlane/lib/fastlane/actions/splunkmint.rb +156 -0
- data/fastlane/lib/fastlane/actions/spm.rb +123 -0
- data/fastlane/lib/fastlane/actions/ssh.rb +162 -0
- data/fastlane/lib/fastlane/actions/supply.rb +14 -0
- data/fastlane/lib/fastlane/actions/swiftlint.rb +182 -0
- data/fastlane/lib/fastlane/actions/sync_code_signing.rb +103 -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 +263 -0
- data/fastlane/lib/fastlane/actions/testflight.rb +14 -0
- data/fastlane/lib/fastlane/actions/tryouts.rb +149 -0
- data/fastlane/lib/fastlane/actions/twitter.rb +89 -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 +91 -0
- data/fastlane/lib/fastlane/actions/update_app_identifier.rb +124 -0
- data/fastlane/lib/fastlane/actions/update_fastlane.rb +177 -0
- data/fastlane/lib/fastlane/actions/update_icloud_container_identifiers.rb +99 -0
- data/fastlane/lib/fastlane/actions/update_info_plist.rb +143 -0
- data/fastlane/lib/fastlane/actions/update_plist.rb +80 -0
- data/fastlane/lib/fastlane/actions/update_project_code_signing.rb +76 -0
- data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +173 -0
- data/fastlane/lib/fastlane/actions/update_project_team.rb +95 -0
- data/fastlane/lib/fastlane/actions/update_urban_airship_configuration.rb +91 -0
- data/fastlane/lib/fastlane/actions/update_url_schemes.rb +123 -0
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +244 -0
- data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +165 -0
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +65 -0
- data/fastlane/lib/fastlane/actions/upload_to_play_store.rb +80 -0
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +107 -0
- data/fastlane/lib/fastlane/actions/validate_play_store_json_key.rb +104 -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 +152 -0
- data/fastlane/lib/fastlane/actions/version_bump_podspec.rb +105 -0
- data/fastlane/lib/fastlane/actions/version_get_podspec.rb +71 -0
- data/fastlane/lib/fastlane/actions/xcode_install.rb +105 -0
- data/fastlane/lib/fastlane/actions/xcode_select.rb +63 -0
- data/fastlane/lib/fastlane/actions/xcode_server_get_assets.rb +312 -0
- data/fastlane/lib/fastlane/actions/xcodebuild.rb +641 -0
- data/fastlane/lib/fastlane/actions/xcov.rb +66 -0
- data/fastlane/lib/fastlane/actions/xctool.rb +55 -0
- data/fastlane/lib/fastlane/actions/xcversion.rb +55 -0
- data/fastlane/lib/fastlane/actions/zip.rb +120 -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 +185 -0
- data/fastlane/lib/fastlane/command_line_handler.rb +49 -0
- data/fastlane/lib/fastlane/commands_generator.rb +350 -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 +89 -0
- data/fastlane/lib/fastlane/documentation/markdown_docs_generator.rb +228 -0
- data/fastlane/lib/fastlane/environment_printer.rb +297 -0
- data/fastlane/lib/fastlane/erb_template_helper.rb +30 -0
- data/fastlane/lib/fastlane/fast_file.rb +351 -0
- data/fastlane/lib/fastlane/fastlane_require.rb +75 -0
- data/fastlane/lib/fastlane/features.rb +4 -0
- data/fastlane/lib/fastlane/helper/README.md +29 -0
- data/fastlane/lib/fastlane/helper/adb_helper.rb +52 -0
- data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +151 -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 +135 -0
- data/fastlane/lib/fastlane/helper/gradle_helper.rb +62 -0
- data/fastlane/lib/fastlane/helper/podspec_helper.rb +75 -0
- data/fastlane/lib/fastlane/helper/sh_helper.rb +134 -0
- data/fastlane/lib/fastlane/helper/xcodeproj_helper.rb +12 -0
- data/fastlane/lib/fastlane/helper/xcversion_helper.rb +25 -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 +140 -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/one_off.rb +45 -0
- data/fastlane/lib/fastlane/other_action.rb +29 -0
- data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +55 -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 +159 -0
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +387 -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 +35 -0
- data/fastlane/lib/fastlane/plugins/template/.circleci/config.yml +43 -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 +180 -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%.rb.erb +16 -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/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 +371 -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 +232 -0
- data/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb +101 -0
- data/fastlane/lib/fastlane/setup/setup.rb +355 -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 +383 -0
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +320 -0
- data/fastlane/lib/fastlane/swift_lane_manager.rb +304 -0
- data/fastlane/lib/fastlane/swift_runner_upgrader.rb +206 -0
- data/fastlane/lib/fastlane/tools.rb +33 -0
- data/fastlane/lib/fastlane/version.rb +6 -0
- data/fastlane/swift/Appfile.swift +17 -0
- data/fastlane/swift/ArgumentProcessor.swift +93 -0
- data/fastlane/swift/ControlCommand.swift +76 -0
- data/fastlane/swift/Deliverfile.swift +21 -0
- data/fastlane/swift/DeliverfileProtocol.swift +129 -0
- data/fastlane/swift/Fastfile.swift +12 -0
- data/fastlane/swift/Fastlane.swift +4396 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +425 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +103 -0
- data/fastlane/swift/FastlaneSwiftRunner/README.txt +10 -0
- data/fastlane/swift/Gymfile.swift +21 -0
- data/fastlane/swift/GymfileProtocol.swift +87 -0
- data/fastlane/swift/LaneFileProtocol.swift +140 -0
- data/fastlane/swift/Matchfile.swift +21 -0
- data/fastlane/swift/MatchfileProtocol.swift +61 -0
- data/fastlane/swift/Precheckfile.swift +21 -0
- data/fastlane/swift/PrecheckfileProtocol.swift +24 -0
- data/fastlane/swift/RubyCommand.swift +141 -0
- data/fastlane/swift/RubyCommandable.swift +44 -0
- data/fastlane/swift/Runner.swift +200 -0
- data/fastlane/swift/RunnerArgument.swift +24 -0
- data/fastlane/swift/Scanfile.swift +21 -0
- data/fastlane/swift/ScanfileProtocol.swift +117 -0
- data/fastlane/swift/Screengrabfile.swift +21 -0
- data/fastlane/swift/ScreengrabfileProtocol.swift +48 -0
- data/fastlane/swift/Snapshotfile.swift +21 -0
- data/fastlane/swift/SnapshotfileProtocol.swift +75 -0
- data/fastlane/swift/SocketClient.swift +305 -0
- data/fastlane/swift/SocketClientDelegateProtocol.swift +25 -0
- data/fastlane/swift/SocketResponse.swift +85 -0
- data/fastlane/swift/main.swift +52 -0
- data/fastlane/swift/upgrade_manifest.json +1 -0
- data/fastlane_core/README.md +79 -0
- data/fastlane_core/lib/assets/XMLTemplate.xml.erb +12 -0
- data/fastlane_core/lib/fastlane_core.rb +46 -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 +71 -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 +80 -0
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +116 -0
- data/fastlane_core/lib/fastlane_core/command_executor.rb +99 -0
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +103 -0
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +314 -0
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +332 -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 +331 -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 +414 -0
- data/fastlane_core/lib/fastlane_core/ios_app_identifier_guesser.rb +112 -0
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +63 -0
- data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +52 -0
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +520 -0
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +74 -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 +44 -0
- data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +48 -0
- data/fastlane_core/lib/fastlane_core/print_table.rb +131 -0
- data/fastlane_core/lib/fastlane_core/project.rb +481 -0
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +111 -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 +17 -0
- data/fastlane_core/lib/fastlane_core/ui/errors.rb +1 -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/fastlane_runner.rb +294 -0
- data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +62 -0
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +158 -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/frameit/README.md +17 -0
- data/frameit/lib/assets/empty.png +0 -0
- data/frameit/lib/frameit.rb +13 -0
- data/frameit/lib/frameit/commands_generator.rb +114 -0
- data/frameit/lib/frameit/config_parser.rb +114 -0
- data/frameit/lib/frameit/dependency_checker.rb +22 -0
- data/frameit/lib/frameit/device_types.rb +18 -0
- data/frameit/lib/frameit/editor.rb +563 -0
- data/frameit/lib/frameit/frame_downloader.rb +85 -0
- data/frameit/lib/frameit/mac_editor.rb +35 -0
- data/frameit/lib/frameit/module.rb +42 -0
- data/frameit/lib/frameit/offsets.rb +21 -0
- data/frameit/lib/frameit/options.rb +82 -0
- data/frameit/lib/frameit/runner.rb +82 -0
- data/frameit/lib/frameit/screenshot.rb +137 -0
- data/frameit/lib/frameit/strings_parser.rb +46 -0
- data/frameit/lib/frameit/template_finder.rb +42 -0
- data/frameit/lib/frameit/trim_box.rb +35 -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.rb +9 -0
- data/gym/lib/gym/code_signing_mapping.rb +181 -0
- data/gym/lib/gym/commands_generator.rb +78 -0
- data/gym/lib/gym/detect_values.rb +171 -0
- data/gym/lib/gym/error_handler.rb +306 -0
- data/gym/lib/gym/generators/README.md +1 -0
- data/gym/lib/gym/generators/build_command_generator.rb +143 -0
- data/gym/lib/gym/generators/package_command_generator.rb +56 -0
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +193 -0
- data/gym/lib/gym/manager.rb +22 -0
- data/gym/lib/gym/module.rb +36 -0
- data/gym/lib/gym/options.rb +262 -0
- data/gym/lib/gym/runner.rb +264 -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/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 +56 -0
- data/match/lib/match.rb +13 -0
- data/match/lib/match/change_password.rb +70 -0
- data/match/lib/match/commands_generator.rb +175 -0
- data/match/lib/match/encryption.rb +45 -0
- data/match/lib/match/encryption/interface.rb +17 -0
- data/match/lib/match/encryption/openssl.rb +161 -0
- data/match/lib/match/generator.rb +91 -0
- data/match/lib/match/migrate.rb +98 -0
- data/match/lib/match/module.rb +27 -0
- data/match/lib/match/nuke.rb +260 -0
- data/match/lib/match/options.rb +198 -0
- data/match/lib/match/runner.rb +333 -0
- data/match/lib/match/setup.rb +40 -0
- data/match/lib/match/spaceship_ensure.rb +83 -0
- data/match/lib/match/storage.rb +42 -0
- data/match/lib/match/storage/git_storage.rb +214 -0
- data/match/lib/match/storage/google_cloud_storage.rb +265 -0
- data/match/lib/match/storage/interface.rb +110 -0
- data/match/lib/match/table_printer.rb +51 -0
- data/match/lib/match/utils.rb +75 -0
- data/pem/README.md +17 -0
- data/pem/lib/pem.rb +4 -0
- data/pem/lib/pem/commands_generator.rb +46 -0
- data/pem/lib/pem/manager.rb +112 -0
- data/pem/lib/pem/module.rb +19 -0
- data/pem/lib/pem/options.rb +103 -0
- data/pilot/README.md +17 -0
- data/pilot/lib/pilot.rb +9 -0
- data/pilot/lib/pilot/build_manager.rb +453 -0
- data/pilot/lib/pilot/commands_generator.rb +174 -0
- data/pilot/lib/pilot/features.rb +0 -0
- data/pilot/lib/pilot/manager.rb +80 -0
- data/pilot/lib/pilot/module.rb +11 -0
- data/pilot/lib/pilot/options.rb +266 -0
- data/pilot/lib/pilot/tester_exporter.rb +58 -0
- data/pilot/lib/pilot/tester_importer.rb +53 -0
- data/pilot/lib/pilot/tester_manager.rb +168 -0
- data/pilot/lib/pilot/tester_util.rb +0 -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.rb +3 -0
- data/precheck/lib/precheck/commands_generator.rb +74 -0
- data/precheck/lib/precheck/item_to_check.rb +58 -0
- data/precheck/lib/precheck/module.rb +21 -0
- data/precheck/lib/precheck/options.rb +79 -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 +231 -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 +176 -0
- data/produce/README.md +17 -0
- data/produce/lib/produce.rb +6 -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 +235 -0
- data/produce/lib/produce/developer_center.rb +134 -0
- data/produce/lib/produce/group.rb +90 -0
- data/produce/lib/produce/itunes_connect.rb +92 -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 +172 -0
- data/produce/lib/produce/service.rb +313 -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.rb +10 -0
- data/scan/lib/scan/commands_generator.rb +78 -0
- data/scan/lib/scan/detect_values.rb +219 -0
- data/scan/lib/scan/error_handler.rb +52 -0
- data/scan/lib/scan/manager.rb +21 -0
- data/scan/lib/scan/module.rb +32 -0
- data/scan/lib/scan/options.rb +390 -0
- data/scan/lib/scan/runner.rb +173 -0
- data/scan/lib/scan/slack_poster.rb +60 -0
- data/scan/lib/scan/test_command_generator.rb +160 -0
- data/scan/lib/scan/test_result_parser.rb +26 -0
- data/scan/lib/scan/xcpretty_reporter_options_generator.rb +85 -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.rb +7 -0
- data/screengrab/lib/screengrab/android_environment.rb +91 -0
- data/screengrab/lib/screengrab/commands_generator.rb +70 -0
- data/screengrab/lib/screengrab/dependency_checker.rb +58 -0
- data/screengrab/lib/screengrab/detect_values.rb +16 -0
- data/screengrab/lib/screengrab/module.rb +24 -0
- data/screengrab/lib/screengrab/options.rb +135 -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 +379 -0
- data/screengrab/lib/screengrab/setup.rb +24 -0
- data/sigh/README.md +17 -0
- data/sigh/lib/assets/resign.sh +888 -0
- data/sigh/lib/sigh.rb +4 -0
- data/sigh/lib/sigh/commands_generator.rb +153 -0
- data/sigh/lib/sigh/download_all.rb +45 -0
- data/sigh/lib/sigh/local_manage.rb +145 -0
- data/sigh/lib/sigh/manager.rb +47 -0
- data/sigh/lib/sigh/module.rb +16 -0
- data/sigh/lib/sigh/options.rb +160 -0
- data/sigh/lib/sigh/repair.rb +34 -0
- data/sigh/lib/sigh/resign.rb +220 -0
- data/sigh/lib/sigh/runner.rb +285 -0
- data/snapshot/README.md +17 -0
- data/snapshot/lib/assets/SnapfileTemplate +34 -0
- data/snapshot/lib/assets/SnapfileTemplate.swift +41 -0
- data/snapshot/lib/assets/SnapshotHelper.swift +303 -0
- data/snapshot/lib/assets/SnapshotHelperXcode8.swift +172 -0
- data/snapshot/lib/snapshot.rb +19 -0
- data/snapshot/lib/snapshot/collector.rb +140 -0
- data/snapshot/lib/snapshot/commands_generator.rb +115 -0
- data/snapshot/lib/snapshot/dependency_checker.rb +69 -0
- data/snapshot/lib/snapshot/detect_values.rb +71 -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_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 +223 -0
- data/snapshot/lib/snapshot/page.html.erb +285 -0
- data/snapshot/lib/snapshot/reports_generator.rb +125 -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 +54 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +215 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +143 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_xcode_8.rb +113 -0
- data/snapshot/lib/snapshot/test_command_generator.rb +102 -0
- data/snapshot/lib/snapshot/test_command_generator_base.rb +117 -0
- data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +67 -0
- data/snapshot/lib/snapshot/update.rb +36 -0
- data/spaceship/README.md +183 -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.rb +26 -0
- data/spaceship/lib/spaceship/babosa_fix.rb +30 -0
- data/spaceship/lib/spaceship/base.rb +310 -0
- data/spaceship/lib/spaceship/client.rb +892 -0
- data/spaceship/lib/spaceship/commands_generator.rb +52 -0
- data/spaceship/lib/spaceship/connect_api.rb +47 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +178 -0
- data/spaceship/lib/spaceship/connect_api/model.rb +152 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +97 -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 +26 -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_group.rb +41 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +56 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_tester_metric.rb +43 -0
- data/spaceship/lib/spaceship/connect_api/models/build.rb +144 -0
- data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +56 -0
- data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +36 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +46 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +37 -0
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +48 -0
- data/spaceship/lib/spaceship/connect_api/models/device.rb +53 -0
- data/spaceship/lib/spaceship/connect_api/models/pre_release_version.rb +20 -0
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +60 -0
- data/spaceship/lib/spaceship/connect_api/models/user.rb +50 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/client.rb +59 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +48 -0
- data/spaceship/lib/spaceship/connect_api/response.rb +67 -0
- data/spaceship/lib/spaceship/connect_api/testflight/client.rb +33 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +322 -0
- data/spaceship/lib/spaceship/connect_api/token.rb +56 -0
- data/spaceship/lib/spaceship/connect_api/users/client.rb +33 -0
- data/spaceship/lib/spaceship/connect_api/users/users.rb +16 -0
- data/spaceship/lib/spaceship/du/du_client.rb +134 -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 +79 -0
- data/spaceship/lib/spaceship/globals.rb +12 -0
- data/spaceship/lib/spaceship/helper/net_http_generic_request.rb +14 -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 +192 -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 +351 -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 +848 -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 +74 -0
- data/spaceship/lib/spaceship/test_flight.rb +10 -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 +239 -0
- data/spaceship/lib/spaceship/test_flight/build_trains.rb +46 -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/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 +961 -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 +448 -0
- data/spaceship/lib/spaceship/tunes/availability.rb +132 -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 +42 -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 +151 -0
- data/spaceship/lib/spaceship/tunes/iap_detail.rb +243 -0
- data/spaceship/lib/spaceship/tunes/iap_families.rb +57 -0
- data/spaceship/lib/spaceship/tunes/iap_family_details.rb +73 -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 +52 -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 +35 -0
- data/spaceship/lib/spaceship/tunes/tunes_base.rb +17 -0
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +1572 -0
- data/spaceship/lib/spaceship/tunes/user_detail.rb +15 -0
- data/spaceship/lib/spaceship/tunes/version_set.rb +26 -0
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +287 -0
- data/spaceship/lib/spaceship/ui.rb +27 -0
- data/supply/README.md +17 -0
- data/supply/lib/supply.rb +30 -0
- data/supply/lib/supply/apk_listing.rb +14 -0
- data/supply/lib/supply/client.rb +458 -0
- data/supply/lib/supply/commands_generator.rb +66 -0
- data/supply/lib/supply/languages.rb +88 -0
- data/supply/lib/supply/listing.rb +32 -0
- data/supply/lib/supply/options.rb +266 -0
- data/supply/lib/supply/reader.rb +25 -0
- data/supply/lib/supply/setup.rb +112 -0
- data/supply/lib/supply/uploader.rb +349 -0
- metadata +1772 -0
@@ -0,0 +1,112 @@
|
|
1
|
+
require 'credentials_manager/appfile_config'
|
2
|
+
|
3
|
+
require_relative 'env'
|
4
|
+
require_relative 'configuration/configuration'
|
5
|
+
|
6
|
+
module FastlaneCore
|
7
|
+
class IOSAppIdentifierGuesser
|
8
|
+
APP_ID_REGEX = /var\s*appIdentifier:\s*String\?{0,1}\s*\[?\]?\s*{\s*return\s*\[?\s*"(\s*[a-zA-Z.-]+\s*)"\s*\]?\s*}/
|
9
|
+
class << self
|
10
|
+
def guess_app_identifier_from_args(args)
|
11
|
+
# args example: ["-a", "com.krausefx.app", "--team_id", "5AA97AAHK2"]
|
12
|
+
args.each_with_index do |current, index|
|
13
|
+
next unless current == "-a" || current == "--app_identifier"
|
14
|
+
# argument names are followed by argument values in the args array;
|
15
|
+
# use [index + 1] to find the package name (range check the array
|
16
|
+
# to avoid array bounds errors)
|
17
|
+
return args[index + 1] if args.count > index
|
18
|
+
end
|
19
|
+
nil
|
20
|
+
end
|
21
|
+
|
22
|
+
def guess_app_identifier_from_environment
|
23
|
+
["FASTLANE", "DELIVER", "PILOT", "PRODUCE", "PEM", "SIGH", "SNAPSHOT", "MATCH"].each do |current|
|
24
|
+
return ENV["#{current}_APP_IDENTIFIER"] if FastlaneCore::Env.truthy?("#{current}_APP_IDENTIFIER")
|
25
|
+
end
|
26
|
+
nil
|
27
|
+
end
|
28
|
+
|
29
|
+
def guess_app_identifier_from_appfile
|
30
|
+
CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
|
31
|
+
end
|
32
|
+
|
33
|
+
def fetch_app_identifier_from_ruby_file(file_name)
|
34
|
+
# we only care about the app_identifier item in the configuration file, so
|
35
|
+
# build an options array & Configuration with just that one key and it will
|
36
|
+
# be fetched if it is present in the config file
|
37
|
+
genericfile_options = [FastlaneCore::ConfigItem.new(key: :app_identifier)]
|
38
|
+
options = FastlaneCore::Configuration.create(genericfile_options, {})
|
39
|
+
# pass the empty proc to disable options validation, otherwise this will fail
|
40
|
+
# when the other (non-app_identifier) keys are encountered in the config file;
|
41
|
+
# 3rd parameter "true" disables the printout of the contents of the
|
42
|
+
# configuration file, which is noisy and confusing in this case
|
43
|
+
options.load_configuration_file(file_name, proc {}, true)
|
44
|
+
return options.fetch(:app_identifier, ask: false)
|
45
|
+
rescue
|
46
|
+
# any option/file error here should just be treated as identifier not found
|
47
|
+
nil
|
48
|
+
end
|
49
|
+
|
50
|
+
def fetch_app_identifier_from_swift_file(file_name)
|
51
|
+
swift_config_file_path = FastlaneCore::Configuration.find_configuration_file_path(config_file_name: file_name)
|
52
|
+
return nil if swift_config_file_path.nil?
|
53
|
+
|
54
|
+
# Deliverfile.swift, Snapfile.swift, Appfile.swift all look like:
|
55
|
+
# var appIdentifier: String? { return nil }
|
56
|
+
# var appIdentifier: String { return "" }
|
57
|
+
|
58
|
+
# Matchfile.swift is the odd one out
|
59
|
+
# var appIdentifier: [String] { return [] }
|
60
|
+
#
|
61
|
+
|
62
|
+
swift_config_file_path = File.expand_path(swift_config_file_path)
|
63
|
+
swift_config_content = File.read(swift_config_file_path)
|
64
|
+
|
65
|
+
swift_config_content.split("\n").reject(&:empty?).each do |line|
|
66
|
+
application_id = match_swift_application_id(text_line: line)
|
67
|
+
return application_id if application_id
|
68
|
+
end
|
69
|
+
return nil
|
70
|
+
rescue
|
71
|
+
# any option/file error here should just be treated as identifier not found
|
72
|
+
return nil
|
73
|
+
end
|
74
|
+
|
75
|
+
def match_swift_application_id(text_line: nil)
|
76
|
+
text_line.strip!
|
77
|
+
application_id_match = APP_ID_REGEX.match(text_line)
|
78
|
+
return application_id_match[1].strip if application_id_match
|
79
|
+
|
80
|
+
return nil
|
81
|
+
end
|
82
|
+
|
83
|
+
def guess_app_identifier_from_config_files
|
84
|
+
["Deliverfile", "Gymfile", "Snapfile", "Matchfile"].each do |current|
|
85
|
+
app_identifier = self.fetch_app_identifier_from_ruby_file(current)
|
86
|
+
return app_identifier if app_identifier
|
87
|
+
end
|
88
|
+
|
89
|
+
# if we're swifty, let's look there
|
90
|
+
# this isn't the same list as above
|
91
|
+
["Deliverfile.swift", "Snapfile.swift", "Appfile.swift", "Matchfile.swift"].each do |current|
|
92
|
+
app_identifier = self.fetch_app_identifier_from_swift_file(current)
|
93
|
+
return app_identifier if app_identifier
|
94
|
+
end
|
95
|
+
return nil
|
96
|
+
end
|
97
|
+
|
98
|
+
# make a best-guess for the app_identifier for this project, using most-reliable signals
|
99
|
+
# first and then using less accurate ones afterwards; because this method only returns
|
100
|
+
# a GUESS for the app_identifier, it is only useful for metrics or other places where
|
101
|
+
# absolute accuracy is not required
|
102
|
+
def guess_app_identifier(args)
|
103
|
+
app_identifier = nil
|
104
|
+
app_identifier ||= guess_app_identifier_from_args(args)
|
105
|
+
app_identifier ||= guess_app_identifier_from_environment
|
106
|
+
app_identifier ||= guess_app_identifier_from_appfile
|
107
|
+
app_identifier ||= guess_app_identifier_from_config_files
|
108
|
+
app_identifier
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'zip'
|
2
|
+
|
3
|
+
require_relative 'core_ext/cfpropertylist'
|
4
|
+
require_relative 'ui/ui'
|
5
|
+
|
6
|
+
module FastlaneCore
|
7
|
+
class IpaFileAnalyser
|
8
|
+
# Fetches the app identifier (e.g. com.facebook.Facebook) from the given ipa file.
|
9
|
+
def self.fetch_app_identifier(path)
|
10
|
+
plist = self.fetch_info_plist_file(path)
|
11
|
+
return plist['CFBundleIdentifier'] if plist
|
12
|
+
return nil
|
13
|
+
end
|
14
|
+
|
15
|
+
# Fetches the app version from the given ipa file.
|
16
|
+
def self.fetch_app_version(path)
|
17
|
+
plist = self.fetch_info_plist_file(path)
|
18
|
+
return plist['CFBundleShortVersionString'] if plist
|
19
|
+
return nil
|
20
|
+
end
|
21
|
+
|
22
|
+
# Fetches the app build number from the given ipa file.
|
23
|
+
def self.fetch_app_build(path)
|
24
|
+
plist = self.fetch_info_plist_file(path)
|
25
|
+
return plist['CFBundleVersion'] if plist
|
26
|
+
return nil
|
27
|
+
end
|
28
|
+
|
29
|
+
# Fetches the app platform from the given ipa file.
|
30
|
+
def self.fetch_app_platform(path)
|
31
|
+
plist = self.fetch_info_plist_file(path)
|
32
|
+
platform = "ios"
|
33
|
+
platform = plist['DTPlatformName'] if plist
|
34
|
+
platform = "ios" if platform == "iphoneos" # via https://github.com/fastlane/fastlane/issues/3484
|
35
|
+
return platform
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.fetch_info_plist_file(path)
|
39
|
+
UI.user_error!("Could not find file at path '#{path}'") unless File.exist?(path)
|
40
|
+
Zip::File.open(path, "rb") do |zipfile|
|
41
|
+
file = zipfile.glob('**/Payload/*.app/Info.plist').first
|
42
|
+
return nil unless file
|
43
|
+
|
44
|
+
# Creates a temporary directory with a unique name tagged with 'fastlane'
|
45
|
+
# The directory is deleted automatically at the end of the block
|
46
|
+
Dir.mktmpdir("fastlane") do |tmp|
|
47
|
+
# The XML file has to be properly unpacked first
|
48
|
+
tmp_path = File.join(tmp, "Info.plist")
|
49
|
+
File.open(tmp_path, 'wb') do |output|
|
50
|
+
output.write(zipfile.read(file))
|
51
|
+
end
|
52
|
+
result = CFPropertyList.native_types(CFPropertyList::List.new(file: tmp_path).value)
|
53
|
+
|
54
|
+
if result['CFBundleIdentifier'] || result['CFBundleVersion']
|
55
|
+
return result
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
return nil
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require "digest/md5"
|
2
|
+
|
3
|
+
require_relative 'globals'
|
4
|
+
require_relative 'ui/ui'
|
5
|
+
require_relative 'module'
|
6
|
+
|
7
|
+
module FastlaneCore
|
8
|
+
# Builds a package for the binary ready to be uploaded with the iTunes Transporter
|
9
|
+
class IpaUploadPackageBuilder
|
10
|
+
METADATA_FILE_NAME = "metadata.xml"
|
11
|
+
|
12
|
+
attr_accessor :package_path
|
13
|
+
|
14
|
+
def generate(app_id: nil, ipa_path: nil, package_path: nil, platform: nil)
|
15
|
+
self.package_path = File.join(package_path, "#{app_id}.itmsp")
|
16
|
+
FileUtils.rm_rf(self.package_path) if File.directory?(self.package_path)
|
17
|
+
FileUtils.mkdir_p(self.package_path)
|
18
|
+
|
19
|
+
ipa_path = copy_ipa(ipa_path)
|
20
|
+
@data = {
|
21
|
+
apple_id: app_id,
|
22
|
+
file_size: File.size(ipa_path),
|
23
|
+
ipa_path: File.basename(ipa_path), # this is only the base name as the ipa is inside the package
|
24
|
+
md5: Digest::MD5.file(ipa_path).hexdigest,
|
25
|
+
archive_type: "bundle",
|
26
|
+
platform: (platform || "ios") # pass "appletvos" for Apple TV's IPA
|
27
|
+
}
|
28
|
+
|
29
|
+
xml_path = File.join(FastlaneCore::ROOT, "lib/assets/XMLTemplate.xml.erb")
|
30
|
+
xml = ERB.new(File.read(xml_path)).result(binding) # https://web.archive.org/web/20160430190141/www.rrn.dk/rubys-erb-templating-system
|
31
|
+
|
32
|
+
File.write(File.join(self.package_path, METADATA_FILE_NAME), xml)
|
33
|
+
UI.success("Wrote XML data to '#{self.package_path}'") if FastlaneCore::Globals.verbose?
|
34
|
+
|
35
|
+
return package_path
|
36
|
+
end
|
37
|
+
|
38
|
+
def unique_ipa_path(ipa_path)
|
39
|
+
"#{Digest::SHA256.file(ipa_path).hexdigest}.ipa"
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def copy_ipa(ipa_path)
|
45
|
+
ipa_file_name = unique_ipa_path(ipa_path)
|
46
|
+
resulting_path = File.join(self.package_path, ipa_file_name)
|
47
|
+
FileUtils.cp(ipa_path, resulting_path)
|
48
|
+
|
49
|
+
return resulting_path
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,520 @@
|
|
1
|
+
require 'shellwords'
|
2
|
+
require 'fileutils'
|
3
|
+
require 'credentials_manager/account_manager'
|
4
|
+
|
5
|
+
require_relative 'features'
|
6
|
+
require_relative 'helper'
|
7
|
+
require_relative 'fastlane_pty'
|
8
|
+
|
9
|
+
module FastlaneCore
|
10
|
+
# The TransporterInputError occurs when you passed wrong inputs to the {Deliver::ItunesTransporter}
|
11
|
+
class TransporterInputError < StandardError
|
12
|
+
end
|
13
|
+
# The TransporterTransferError occurs when some error happens
|
14
|
+
# while uploading or downloading something from/to iTC
|
15
|
+
class TransporterTransferError < StandardError
|
16
|
+
end
|
17
|
+
|
18
|
+
# Used internally
|
19
|
+
class TransporterRequiresApplicationSpecificPasswordError < StandardError
|
20
|
+
end
|
21
|
+
|
22
|
+
# Base class for executing the iTMSTransporter
|
23
|
+
class TransporterExecutor
|
24
|
+
ERROR_REGEX = />\s*ERROR:\s+(.+)/
|
25
|
+
WARNING_REGEX = />\s*WARN:\s+(.+)/
|
26
|
+
OUTPUT_REGEX = />\s+(.+)/
|
27
|
+
RETURN_VALUE_REGEX = />\sDBG-X:\sReturning\s+(\d+)/
|
28
|
+
|
29
|
+
SKIP_ERRORS = ["ERROR: An exception has occurred: Scheduling automatic restart in 1 minute"]
|
30
|
+
|
31
|
+
private_constant :ERROR_REGEX, :WARNING_REGEX, :OUTPUT_REGEX, :RETURN_VALUE_REGEX, :SKIP_ERRORS
|
32
|
+
|
33
|
+
def execute(command, hide_output)
|
34
|
+
if Helper.test?
|
35
|
+
yield(nil) if block_given?
|
36
|
+
return command
|
37
|
+
end
|
38
|
+
|
39
|
+
@errors = []
|
40
|
+
@warnings = []
|
41
|
+
@all_lines = []
|
42
|
+
|
43
|
+
if hide_output
|
44
|
+
# Show a one time message instead
|
45
|
+
UI.success("Waiting for App Store Connect transporter to be finished.")
|
46
|
+
UI.success("iTunes Transporter progress... this might take a few minutes...")
|
47
|
+
end
|
48
|
+
|
49
|
+
begin
|
50
|
+
exit_status = FastlaneCore::FastlanePty.spawn(command) do |command_stdout, command_stdin, pid|
|
51
|
+
begin
|
52
|
+
command_stdout.each do |line|
|
53
|
+
@all_lines << line
|
54
|
+
parse_line(line, hide_output) # this is where the parsing happens
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
rescue => ex
|
59
|
+
# FastlanePty adds exit_status on to StandardError so every error will have a status code
|
60
|
+
exit_status = ex.exit_status
|
61
|
+
@errors << ex.to_s
|
62
|
+
end
|
63
|
+
|
64
|
+
unless exit_status.zero?
|
65
|
+
@errors << "The call to the iTMSTransporter completed with a non-zero exit status: #{exit_status}. This indicates a failure."
|
66
|
+
end
|
67
|
+
|
68
|
+
if @warnings.count > 0
|
69
|
+
UI.important(@warnings.join("\n"))
|
70
|
+
end
|
71
|
+
|
72
|
+
if @errors.join("").include?("app-specific")
|
73
|
+
raise TransporterRequiresApplicationSpecificPasswordError
|
74
|
+
end
|
75
|
+
|
76
|
+
if @errors.count > 0 && @all_lines.count > 0
|
77
|
+
# Print out the last 15 lines, this is key for non-verbose mode
|
78
|
+
@all_lines.last(15).each do |line|
|
79
|
+
UI.important("[iTMSTransporter] #{line}")
|
80
|
+
end
|
81
|
+
UI.message("iTunes Transporter output above ^")
|
82
|
+
UI.error(@errors.join("\n"))
|
83
|
+
end
|
84
|
+
|
85
|
+
# this is to handle GitHub issue #1896, which occurs when an
|
86
|
+
# iTMSTransporter file transfer fails; iTMSTransporter will log an error
|
87
|
+
# but will then retry; if that retry is successful, we will see the error
|
88
|
+
# logged, but since the status code is zero, we want to return success
|
89
|
+
if @errors.count > 0 && exit_status.zero?
|
90
|
+
UI.important("Although errors occurred during execution of iTMSTransporter, it returned success status.")
|
91
|
+
end
|
92
|
+
|
93
|
+
yield(@all_lines) if block_given?
|
94
|
+
return exit_status.zero?
|
95
|
+
end
|
96
|
+
|
97
|
+
private
|
98
|
+
|
99
|
+
def parse_line(line, hide_output)
|
100
|
+
# Taken from https://github.com/sshaw/itunes_store_transporter/blob/master/lib/itunes/store/transporter/output_parser.rb
|
101
|
+
|
102
|
+
output_done = false
|
103
|
+
|
104
|
+
re = Regexp.union(SKIP_ERRORS)
|
105
|
+
if line.match(re)
|
106
|
+
# Those lines will not be handled like errors or warnings
|
107
|
+
|
108
|
+
elsif line =~ ERROR_REGEX
|
109
|
+
@errors << $1
|
110
|
+
UI.error("[Transporter Error Output]: #{$1}")
|
111
|
+
|
112
|
+
# Check if it's a login error
|
113
|
+
if $1.include?("Your Apple ID or password was entered incorrectly") ||
|
114
|
+
$1.include?("This Apple ID has been locked for security reasons")
|
115
|
+
|
116
|
+
unless Helper.test?
|
117
|
+
CredentialsManager::AccountManager.new(user: @user).invalid_credentials
|
118
|
+
UI.error("Please run this tool again to apply the new password")
|
119
|
+
end
|
120
|
+
elsif $1.include?("Redundant Binary Upload. There already exists a binary upload with build")
|
121
|
+
UI.error($1)
|
122
|
+
UI.error("You have to change the build number of your app to upload your ipa file")
|
123
|
+
end
|
124
|
+
|
125
|
+
output_done = true
|
126
|
+
elsif line =~ WARNING_REGEX
|
127
|
+
@warnings << $1
|
128
|
+
UI.important("[Transporter Warning Output]: #{$1}")
|
129
|
+
output_done = true
|
130
|
+
end
|
131
|
+
|
132
|
+
if line =~ RETURN_VALUE_REGEX
|
133
|
+
if $1.to_i != 0
|
134
|
+
UI.error("Transporter transfer failed.")
|
135
|
+
UI.important(@warnings.join("\n"))
|
136
|
+
UI.error(@errors.join("\n"))
|
137
|
+
UI.crash!("Return status of iTunes Transporter was #{$1}: #{@errors.join('\n')}")
|
138
|
+
else
|
139
|
+
UI.success("iTunes Transporter successfully finished its job")
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
if !hide_output && line =~ OUTPUT_REGEX
|
144
|
+
# General logging for debug purposes
|
145
|
+
unless output_done
|
146
|
+
UI.verbose("[Transporter]: #{$1}")
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
def additional_upload_parameters
|
152
|
+
# Workaround because the traditional transporter broke on 1st March 2018
|
153
|
+
# More information https://github.com/fastlane/fastlane/issues/11958
|
154
|
+
# As there was no communication from Apple, we don't know if this is a temporary
|
155
|
+
# server outage, or something they changed without giving a heads-up
|
156
|
+
if ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"].to_s.length == 0
|
157
|
+
ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"] = "-t DAV"
|
158
|
+
end
|
159
|
+
return ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"]
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
# Generates commands and executes the iTMSTransporter through the shell script it provides by the same name
|
164
|
+
class ShellScriptTransporterExecutor < TransporterExecutor
|
165
|
+
def build_upload_command(username, password, source = "/tmp", provider_short_name = "")
|
166
|
+
[
|
167
|
+
'"' + Helper.transporter_path + '"',
|
168
|
+
"-m upload",
|
169
|
+
"-u #{username.shellescape}",
|
170
|
+
"-p #{shell_escaped_password(password)}",
|
171
|
+
"-f \"#{source}\"",
|
172
|
+
additional_upload_parameters, # that's here, because the user might overwrite the -t option
|
173
|
+
"-t Signiant",
|
174
|
+
"-k 100000",
|
175
|
+
("-WONoPause true" if Helper.windows?), # Windows only: process instantly returns instead of waiting for key press
|
176
|
+
("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?)
|
177
|
+
].compact.join(' ')
|
178
|
+
end
|
179
|
+
|
180
|
+
def build_download_command(username, password, apple_id, destination = "/tmp", provider_short_name = "")
|
181
|
+
[
|
182
|
+
'"' + Helper.transporter_path + '"',
|
183
|
+
"-m lookupMetadata",
|
184
|
+
"-u #{username.shellescape}",
|
185
|
+
"-p #{shell_escaped_password(password)}",
|
186
|
+
"-apple_id #{apple_id}",
|
187
|
+
"-destination '#{destination}'",
|
188
|
+
("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?)
|
189
|
+
].compact.join(' ')
|
190
|
+
end
|
191
|
+
|
192
|
+
def build_provider_ids_command(username, password)
|
193
|
+
[
|
194
|
+
'"' + Helper.transporter_path + '"',
|
195
|
+
'-m provider',
|
196
|
+
"-u \"#{username}\"",
|
197
|
+
"-p #{shell_escaped_password(password)}"
|
198
|
+
].compact.join(' ')
|
199
|
+
end
|
200
|
+
|
201
|
+
def handle_error(password)
|
202
|
+
# rubocop:disable Style/CaseEquality
|
203
|
+
# rubocop:disable Style/YodaCondition
|
204
|
+
unless /^[0-9a-zA-Z\.\$\_\-]*$/ === password
|
205
|
+
UI.error([
|
206
|
+
"Password contains special characters, which may not be handled properly by iTMSTransporter.",
|
207
|
+
"If you experience problems uploading to App Store Connect, please consider changing your password to something with only alphanumeric characters."
|
208
|
+
].join(' '))
|
209
|
+
end
|
210
|
+
# rubocop:enable Style/CaseEquality
|
211
|
+
# rubocop:enable Style/YodaCondition
|
212
|
+
|
213
|
+
UI.error("Could not download/upload from App Store Connect! It's probably related to your password or your internet connection.")
|
214
|
+
end
|
215
|
+
|
216
|
+
private
|
217
|
+
|
218
|
+
def shell_escaped_password(password)
|
219
|
+
password = password.shellescape
|
220
|
+
unless Helper.windows?
|
221
|
+
# because the shell handles passwords with single-quotes incorrectly, use `gsub` to replace `shellescape`'d single-quotes of this form:
|
222
|
+
# \'
|
223
|
+
# with a sequence that wraps the escaped single-quote in double-quotes:
|
224
|
+
# '"\'"'
|
225
|
+
# this allows us to properly handle passwords with single-quotes in them
|
226
|
+
# background: https://stackoverflow.com/questions/1250079/how-to-escape-single-quotes-within-single-quoted-strings/1250098#1250098
|
227
|
+
password = password.gsub("\\'") do
|
228
|
+
# we use the 'do' version of gsub, because two-param version interprets the replace text as a pattern and does the wrong thing
|
229
|
+
"'\"\\'\"'"
|
230
|
+
end
|
231
|
+
|
232
|
+
# 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)
|
233
|
+
password = "'" + password + "'"
|
234
|
+
end
|
235
|
+
return password
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
# Generates commands and executes the iTMSTransporter by invoking its Java app directly, to avoid the crazy parameter
|
240
|
+
# escaping problems in its accompanying shell script.
|
241
|
+
class JavaTransporterExecutor < TransporterExecutor
|
242
|
+
def build_upload_command(username, password, source = "/tmp", provider_short_name = "")
|
243
|
+
[
|
244
|
+
Helper.transporter_java_executable_path.shellescape,
|
245
|
+
"-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
|
246
|
+
'-XX:NewSize=2m',
|
247
|
+
'-Xms32m',
|
248
|
+
'-Xmx1024m',
|
249
|
+
'-Xms1024m',
|
250
|
+
'-Djava.awt.headless=true',
|
251
|
+
'-Dsun.net.http.retryPost=false',
|
252
|
+
java_code_option,
|
253
|
+
'-m upload',
|
254
|
+
"-u #{username.shellescape}",
|
255
|
+
"-p #{password.shellescape}",
|
256
|
+
"-f #{source.shellescape}",
|
257
|
+
additional_upload_parameters, # that's here, because the user might overwrite the -t option
|
258
|
+
'-t Signiant',
|
259
|
+
'-k 100000',
|
260
|
+
("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?),
|
261
|
+
'2>&1' # cause stderr to be written to stdout
|
262
|
+
].compact.join(' ') # compact gets rid of the possibly nil ENV value
|
263
|
+
end
|
264
|
+
|
265
|
+
def build_download_command(username, password, apple_id, destination = "/tmp", provider_short_name = "")
|
266
|
+
[
|
267
|
+
Helper.transporter_java_executable_path.shellescape,
|
268
|
+
"-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
|
269
|
+
'-XX:NewSize=2m',
|
270
|
+
'-Xms32m',
|
271
|
+
'-Xmx1024m',
|
272
|
+
'-Xms1024m',
|
273
|
+
'-Djava.awt.headless=true',
|
274
|
+
'-Dsun.net.http.retryPost=false',
|
275
|
+
java_code_option,
|
276
|
+
'-m lookupMetadata',
|
277
|
+
"-u #{username.shellescape}",
|
278
|
+
"-p #{password.shellescape}",
|
279
|
+
"-apple_id #{apple_id.shellescape}",
|
280
|
+
"-destination #{destination.shellescape}",
|
281
|
+
("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?),
|
282
|
+
'2>&1' # cause stderr to be written to stdout
|
283
|
+
].compact.join(' ')
|
284
|
+
end
|
285
|
+
|
286
|
+
def build_provider_ids_command(username, password)
|
287
|
+
[
|
288
|
+
Helper.transporter_java_executable_path.shellescape,
|
289
|
+
"-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
|
290
|
+
'-XX:NewSize=2m',
|
291
|
+
'-Xms32m',
|
292
|
+
'-Xmx1024m',
|
293
|
+
'-Xms1024m',
|
294
|
+
'-Djava.awt.headless=true',
|
295
|
+
'-Dsun.net.http.retryPost=false',
|
296
|
+
java_code_option,
|
297
|
+
'-m provider',
|
298
|
+
"-u #{username.shellescape}",
|
299
|
+
"-p #{password.shellescape}",
|
300
|
+
'2>&1' # cause stderr to be written to stdout
|
301
|
+
].compact.join(' ')
|
302
|
+
end
|
303
|
+
|
304
|
+
def java_code_option
|
305
|
+
if Helper.mac? && Helper.xcode_at_least?(9)
|
306
|
+
return "-jar #{Helper.transporter_java_jar_path.shellescape}"
|
307
|
+
else
|
308
|
+
return "-classpath #{Helper.transporter_java_jar_path.shellescape} com.apple.transporter.Application"
|
309
|
+
end
|
310
|
+
end
|
311
|
+
|
312
|
+
def handle_error(password)
|
313
|
+
unless File.exist?(Helper.transporter_java_jar_path)
|
314
|
+
UI.error("The iTMSTransporter Java app was not found at '#{Helper.transporter_java_jar_path}'.")
|
315
|
+
UI.error("If you're using Xcode 6, please select the shell script executor by setting the environment variable "\
|
316
|
+
"FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT=1")
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
def execute(command, hide_output)
|
321
|
+
# The Java command needs to be run starting in a working directory in the iTMSTransporter
|
322
|
+
# file area. The shell script takes care of changing directories over to there, but we'll
|
323
|
+
# handle it manually here for this strategy.
|
324
|
+
FileUtils.cd(Helper.itms_path) do
|
325
|
+
return super(command, hide_output)
|
326
|
+
end
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
330
|
+
class ItunesTransporter
|
331
|
+
# Matches a line in the provider table: "12 Initech Systems Inc LG89CQY559"
|
332
|
+
PROVIDER_REGEX = /^\d+\s{2,}.+\s{2,}[^\s]+$/
|
333
|
+
TWO_STEP_HOST_PREFIX = "deliver.appspecific"
|
334
|
+
|
335
|
+
# This will be called from the Deliverfile, and disables the logging of the transporter output
|
336
|
+
def self.hide_transporter_output
|
337
|
+
@hide_transporter_output = !FastlaneCore::Globals.verbose?
|
338
|
+
end
|
339
|
+
|
340
|
+
def self.hide_transporter_output?
|
341
|
+
@hide_transporter_output
|
342
|
+
end
|
343
|
+
|
344
|
+
# Returns a new instance of the iTunesTransporter.
|
345
|
+
# If no username or password given, it will be taken from
|
346
|
+
# the #{CredentialsManager::AccountManager}
|
347
|
+
# @param use_shell_script if true, forces use of the iTMSTransporter shell script.
|
348
|
+
# if false, allows a direct call to the iTMSTransporter Java app (preferred).
|
349
|
+
# see: https://github.com/fastlane/fastlane/pull/4003
|
350
|
+
# @param provider_short_name The provider short name to be given to the iTMSTransporter to identify the
|
351
|
+
# correct team for this work. The provider short name is usually your Developer
|
352
|
+
# Portal team ID, but in certain cases it is different!
|
353
|
+
# see: https://github.com/fastlane/fastlane/issues/1524#issuecomment-196370628
|
354
|
+
# for more information about how to use the iTMSTransporter to list your provider
|
355
|
+
# short names
|
356
|
+
def initialize(user = nil, password = nil, use_shell_script = false, provider_short_name = nil)
|
357
|
+
# Xcode 6.x doesn't have the same iTMSTransporter Java setup as later Xcode versions, so
|
358
|
+
# we can't default to using the newer direct Java invocation strategy for those versions.
|
359
|
+
use_shell_script ||= Helper.is_mac? && Helper.xcode_version.start_with?('6.')
|
360
|
+
use_shell_script ||= Helper.windows?
|
361
|
+
use_shell_script ||= Feature.enabled?('FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT')
|
362
|
+
|
363
|
+
@user = user
|
364
|
+
@password = password || load_password_for_transporter
|
365
|
+
|
366
|
+
@transporter_executor = use_shell_script ? ShellScriptTransporterExecutor.new : JavaTransporterExecutor.new
|
367
|
+
@provider_short_name = provider_short_name
|
368
|
+
end
|
369
|
+
|
370
|
+
# Downloads the latest version of the app metadata package from iTC.
|
371
|
+
# @param app_id [Integer] The unique App ID
|
372
|
+
# @param dir [String] the path in which the package file should be stored
|
373
|
+
# @return (Bool) True if everything worked fine
|
374
|
+
# @raise [Deliver::TransporterTransferError] when something went wrong
|
375
|
+
# when transferring
|
376
|
+
def download(app_id, dir = nil)
|
377
|
+
dir ||= "/tmp"
|
378
|
+
|
379
|
+
UI.message("Going to download app metadata from App Store Connect")
|
380
|
+
command = @transporter_executor.build_download_command(@user, @password, app_id, dir, @provider_short_name)
|
381
|
+
UI.verbose(@transporter_executor.build_download_command(@user, 'YourPassword', app_id, dir, @provider_short_name))
|
382
|
+
|
383
|
+
begin
|
384
|
+
result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
|
385
|
+
rescue TransporterRequiresApplicationSpecificPasswordError => ex
|
386
|
+
handle_two_step_failure(ex)
|
387
|
+
return download(app_id, dir)
|
388
|
+
end
|
389
|
+
|
390
|
+
return result if Helper.test?
|
391
|
+
|
392
|
+
itmsp_path = File.join(dir, "#{app_id}.itmsp")
|
393
|
+
successful = result && File.directory?(itmsp_path)
|
394
|
+
|
395
|
+
if successful
|
396
|
+
UI.success("✅ Successfully downloaded the latest package from App Store Connect to #{itmsp_path}")
|
397
|
+
else
|
398
|
+
handle_error(@password)
|
399
|
+
end
|
400
|
+
|
401
|
+
successful
|
402
|
+
end
|
403
|
+
|
404
|
+
# Uploads the modified package back to App Store Connect
|
405
|
+
# @param app_id [Integer] The unique App ID
|
406
|
+
# @param dir [String] the path in which the package file is located
|
407
|
+
# @return (Bool) True if everything worked fine
|
408
|
+
# @raise [Deliver::TransporterTransferError] when something went wrong
|
409
|
+
# when transferring
|
410
|
+
def upload(app_id, dir)
|
411
|
+
actual_dir = File.join(dir, "#{app_id}.itmsp")
|
412
|
+
|
413
|
+
UI.message("Going to upload updated app to App Store Connect")
|
414
|
+
UI.success("This might take a few minutes. Please don't interrupt the script.")
|
415
|
+
|
416
|
+
command = @transporter_executor.build_upload_command(@user, @password, actual_dir, @provider_short_name)
|
417
|
+
UI.verbose(@transporter_executor.build_upload_command(@user, 'YourPassword', actual_dir, @provider_short_name))
|
418
|
+
|
419
|
+
begin
|
420
|
+
result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
|
421
|
+
rescue TransporterRequiresApplicationSpecificPasswordError => ex
|
422
|
+
handle_two_step_failure(ex)
|
423
|
+
return upload(app_id, dir)
|
424
|
+
end
|
425
|
+
|
426
|
+
if result
|
427
|
+
UI.header("Successfully uploaded package to App Store Connect. It might take a few minutes until it's visible online.")
|
428
|
+
|
429
|
+
FileUtils.rm_rf(actual_dir) unless Helper.test? # we don't need the package any more, since the upload was successful
|
430
|
+
else
|
431
|
+
handle_error(@password)
|
432
|
+
end
|
433
|
+
|
434
|
+
result
|
435
|
+
end
|
436
|
+
|
437
|
+
def provider_ids
|
438
|
+
command = @transporter_executor.build_provider_ids_command(@user, @password)
|
439
|
+
UI.verbose(@transporter_executor.build_provider_ids_command(@user, 'YourPassword'))
|
440
|
+
lines = []
|
441
|
+
begin
|
442
|
+
result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?) { |xs| lines = xs }
|
443
|
+
return result if Helper.test?
|
444
|
+
rescue TransporterRequiresApplicationSpecificPasswordError => ex
|
445
|
+
handle_two_step_failure(ex)
|
446
|
+
return provider_ids
|
447
|
+
end
|
448
|
+
|
449
|
+
lines.map { |line| provider_pair(line) }.compact.to_h
|
450
|
+
end
|
451
|
+
|
452
|
+
private
|
453
|
+
|
454
|
+
TWO_FACTOR_ENV_VARIABLE = "FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD"
|
455
|
+
|
456
|
+
# Returns the password to be used with the transporter
|
457
|
+
def load_password_for_transporter
|
458
|
+
# 3 different sources for the password
|
459
|
+
# 1) ENV variable for application specific password
|
460
|
+
if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0
|
461
|
+
UI.message("Fetching password for transporter from environment variable named `#{TWO_FACTOR_ENV_VARIABLE}`")
|
462
|
+
return ENV[TWO_FACTOR_ENV_VARIABLE]
|
463
|
+
end
|
464
|
+
# 2) TWO_STEP_HOST_PREFIX from keychain
|
465
|
+
account_manager = CredentialsManager::AccountManager.new(user: @user,
|
466
|
+
prefix: TWO_STEP_HOST_PREFIX,
|
467
|
+
note: "application-specific")
|
468
|
+
password = account_manager.password(ask_if_missing: false)
|
469
|
+
return password if password.to_s.length > 0
|
470
|
+
# 3) standard iTC password
|
471
|
+
account_manager = CredentialsManager::AccountManager.new(user: @user)
|
472
|
+
return account_manager.password(ask_if_missing: true)
|
473
|
+
end
|
474
|
+
|
475
|
+
# Tells the user how to get an application specific password
|
476
|
+
def handle_two_step_failure(ex)
|
477
|
+
if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0
|
478
|
+
# Password provided, however we already used it
|
479
|
+
UI.error("")
|
480
|
+
UI.error("Application specific password you provided using")
|
481
|
+
UI.error("environment variable #{TWO_FACTOR_ENV_VARIABLE}")
|
482
|
+
UI.error("is invalid, please make sure it's correct")
|
483
|
+
UI.error("")
|
484
|
+
UI.user_error!("Invalid application specific password provided")
|
485
|
+
end
|
486
|
+
|
487
|
+
a = CredentialsManager::AccountManager.new(user: @user,
|
488
|
+
prefix: TWO_STEP_HOST_PREFIX,
|
489
|
+
note: "application-specific")
|
490
|
+
if a.password(ask_if_missing: false).to_s.length > 0
|
491
|
+
# user already entered one.. delete the old one
|
492
|
+
UI.error("Application specific password seems wrong")
|
493
|
+
UI.error("Please make sure to follow the instructions")
|
494
|
+
a.remove_from_keychain
|
495
|
+
end
|
496
|
+
UI.error("")
|
497
|
+
UI.error("Your account has 2 step verification enabled")
|
498
|
+
UI.error("Please go to https://appleid.apple.com/account/manage")
|
499
|
+
UI.error("and generate an application specific password for")
|
500
|
+
UI.error("the iTunes Transporter, which is used to upload builds")
|
501
|
+
UI.error("")
|
502
|
+
UI.error("To set the application specific password on a CI machine using")
|
503
|
+
UI.error("an environment variable, you can set the")
|
504
|
+
UI.error("#{TWO_FACTOR_ENV_VARIABLE} variable")
|
505
|
+
@password = a.password(ask_if_missing: true) # to ask the user for the missing value
|
506
|
+
|
507
|
+
return true
|
508
|
+
end
|
509
|
+
|
510
|
+
def handle_error(password)
|
511
|
+
@transporter_executor.handle_error(password)
|
512
|
+
end
|
513
|
+
|
514
|
+
def provider_pair(line)
|
515
|
+
line = line.strip
|
516
|
+
return nil unless line =~ PROVIDER_REGEX
|
517
|
+
line.split(/\s{2,}/).drop(1)
|
518
|
+
end
|
519
|
+
end
|
520
|
+
end
|