fastlane_hotfix 2.165.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +1 -0
- data/LICENSE +21 -0
- data/README.md +208 -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 +60 -0
- data/cert/lib/cert/module.rb +16 -0
- data/cert/lib/cert/options.rb +132 -0
- data/cert/lib/cert/runner.rb +239 -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 +196 -0
- data/credentials_manager/lib/credentials_manager/cli.rb +69 -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 +354 -0
- data/deliver/lib/deliver/app_screenshot_iterator.rb +95 -0
- data/deliver/lib/deliver/commands_generator.rb +190 -0
- data/deliver/lib/deliver/detect_values.rb +102 -0
- data/deliver/lib/deliver/download_screenshots.rb +76 -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 +55 -0
- data/deliver/lib/deliver/module.rb +18 -0
- data/deliver/lib/deliver/options.rb +465 -0
- data/deliver/lib/deliver/queue_worker.rb +49 -0
- data/deliver/lib/deliver/runner.rb +233 -0
- data/deliver/lib/deliver/setup.rb +199 -0
- data/deliver/lib/deliver/submit_for_review.rb +214 -0
- data/deliver/lib/deliver/upload_metadata.rb +688 -0
- data/deliver/lib/deliver/upload_price_tier.rb +40 -0
- data/deliver/lib/deliver/upload_screenshots.rb +333 -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 +53 -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 +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 +249 -0
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +134 -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 +226 -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 +165 -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 +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 +230 -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 +54 -0
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +72 -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 +170 -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 +211 -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 +177 -0
- data/fastlane/lib/fastlane/actions/create_pull_request.rb +265 -0
- data/fastlane/lib/fastlane/actions/danger.rb +131 -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_app.md +245 -0
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +333 -0
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +371 -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 +349 -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 +573 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +725 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +203 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +250 -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 +369 -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 +58 -0
- data/fastlane/lib/fastlane/actions/ensure_git_branch.rb +69 -0
- data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +92 -0
- data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +135 -0
- data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +125 -0
- data/fastlane/lib/fastlane/actions/environment_variable.rb +77 -0
- data/fastlane/lib/fastlane/actions/erb.rb +96 -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 +77 -0
- data/fastlane/lib/fastlane/actions/get_github_release.rb +166 -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 +101 -0
- data/fastlane/lib/fastlane/actions/get_push_certificate.rb +87 -0
- data/fastlane/lib/fastlane/actions/get_version_number.rb +200 -0
- data/fastlane/lib/fastlane/actions/git_add.rb +93 -0
- data/fastlane/lib/fastlane/actions/git_branch.rb +61 -0
- data/fastlane/lib/fastlane/actions/git_commit.rb +80 -0
- data/fastlane/lib/fastlane/actions/git_pull.rb +64 -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_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 +329 -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 +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 +83 -0
- data/fastlane/lib/fastlane/actions/increment_build_number.rb +117 -0
- data/fastlane/lib/fastlane/actions/increment_version_number.rb +180 -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 +60 -0
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +155 -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/notarize.rb +193 -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 +186 -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 +173 -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 +151 -0
- data/fastlane/lib/fastlane/actions/register_devices.rb +214 -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 +114 -0
- data/fastlane/lib/fastlane/actions/s3.rb +174 -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 +204 -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 +132 -0
- data/fastlane/lib/fastlane/actions/setup_circle_ci.rb +58 -0
- data/fastlane/lib/fastlane/actions/setup_jenkins.rb +202 -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 +329 -0
- data/fastlane/lib/fastlane/actions/snapshot.rb +14 -0
- data/fastlane/lib/fastlane/actions/sonar.rb +177 -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 +138 -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 +240 -0
- data/fastlane/lib/fastlane/actions/sync_code_signing.rb +109 -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 +285 -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_code_signing_settings.rb +203 -0
- data/fastlane/lib/fastlane/actions/update_fastlane.rb +137 -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_keychain_access_groups.rb +94 -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 +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 +231 -0
- data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +165 -0
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +67 -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 +119 -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 +159 -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 +68 -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 +207 -0
- data/fastlane/lib/fastlane/command_line_handler.rb +49 -0
- data/fastlane/lib/fastlane/commands_generator.rb +369 -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 +303 -0
- data/fastlane/lib/fastlane/erb_template_helper.rb +30 -0
- data/fastlane/lib/fastlane/fast_file.rb +439 -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 +66 -0
- data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +157 -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 +137 -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/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 +130 -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 +399 -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/.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%.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 +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 +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 +477 -0
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +419 -0
- data/fastlane/lib/fastlane/swift_lane_manager.rb +296 -0
- data/fastlane/lib/fastlane/swift_runner_upgrader.rb +210 -0
- data/fastlane/lib/fastlane/tools.rb +33 -0
- data/fastlane/lib/fastlane/version.rb +6 -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/ControlCommand.swift +74 -0
- data/fastlane/swift/Deliverfile.swift +20 -0
- data/fastlane/swift/DeliverfileProtocol.swift +259 -0
- data/fastlane/swift/Fastfile.swift +16 -0
- data/fastlane/swift/Fastlane.swift +9402 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +434 -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 +187 -0
- data/fastlane/swift/LaneFileProtocol.swift +149 -0
- data/fastlane/swift/MainProcess.swift +77 -0
- data/fastlane/swift/Matchfile.swift +20 -0
- data/fastlane/swift/MatchfileProtocol.swift +187 -0
- data/fastlane/swift/Plugins.swift +16 -0
- data/fastlane/swift/Precheckfile.swift +20 -0
- data/fastlane/swift/PrecheckfileProtocol.swift +51 -0
- data/fastlane/swift/RubyCommand.swift +157 -0
- data/fastlane/swift/RubyCommandable.swift +43 -0
- data/fastlane/swift/Runner.swift +275 -0
- data/fastlane/swift/RunnerArgument.swift +20 -0
- data/fastlane/swift/Scanfile.swift +20 -0
- data/fastlane/swift/ScanfileProtocol.swift +263 -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 +187 -0
- data/fastlane/swift/SocketClient.swift +327 -0
- data/fastlane/swift/SocketClientDelegateProtocol.swift +21 -0
- data/fastlane/swift/SocketResponse.swift +82 -0
- data/fastlane/swift/formatting/Brewfile +1 -0
- data/fastlane/swift/formatting/Brewfile.lock.json +47 -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 +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 +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 +96 -0
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +144 -0
- data/fastlane_core/lib/fastlane_core/command_executor.rb +100 -0
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +103 -0
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +321 -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 +374 -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 +437 -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 +595 -0
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +120 -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 +51 -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 +509 -0
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +124 -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 +159 -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 +140 -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 +144 -0
- data/frameit/lib/frameit/editor.rb +560 -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 +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 +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 +210 -0
- data/gym/lib/gym/commands_generator.rb +78 -0
- data/gym/lib/gym/detect_values.rb +206 -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 +147 -0
- data/gym/lib/gym/generators/package_command_generator.rb +68 -0
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +232 -0
- data/gym/lib/gym/manager.rb +22 -0
- data/gym/lib/gym/module.rb +74 -0
- data/gym/lib/gym/options.rb +286 -0
- data/gym/lib/gym/runner.rb +365 -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 +59 -0
- data/match/lib/match.rb +14 -0
- data/match/lib/match/change_password.rb +53 -0
- data/match/lib/match/commands_generator.rb +190 -0
- data/match/lib/match/encryption.rb +49 -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 +122 -0
- data/match/lib/match/importer.rb +157 -0
- data/match/lib/match/migrate.rb +109 -0
- data/match/lib/match/module.rb +32 -0
- data/match/lib/match/nuke.rb +350 -0
- data/match/lib/match/options.rb +315 -0
- data/match/lib/match/runner.rb +369 -0
- data/match/lib/match/setup.rb +40 -0
- data/match/lib/match/spaceship_ensure.rb +97 -0
- data/match/lib/match/storage.rb +46 -0
- data/match/lib/match/storage/git_storage.rb +250 -0
- data/match/lib/match/storage/google_cloud_storage.rb +382 -0
- data/match/lib/match/storage/interface.rb +119 -0
- data/match/lib/match/storage/s3_storage.rb +205 -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 +47 -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 +546 -0
- data/pilot/lib/pilot/commands_generator.rb +174 -0
- data/pilot/lib/pilot/features.rb +0 -0
- data/pilot/lib/pilot/manager.rb +90 -0
- data/pilot/lib/pilot/module.rb +11 -0
- data/pilot/lib/pilot/options.rb +303 -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 +104 -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 +197 -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 +236 -0
- data/produce/lib/produce/developer_center.rb +143 -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 +319 -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 +224 -0
- data/scan/lib/scan/error_handler.rb +57 -0
- data/scan/lib/scan/manager.rb +38 -0
- data/scan/lib/scan/module.rb +32 -0
- data/scan/lib/scan/options.rb +445 -0
- data/scan/lib/scan/runner.rb +197 -0
- data/scan/lib/scan/slack_poster.rb +60 -0
- data/scan/lib/scan/test_command_generator.rb +174 -0
- data/scan/lib/scan/test_result_parser.rb +33 -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 +26 -0
- data/screengrab/lib/screengrab/options.rb +148 -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 +449 -0
- data/screengrab/lib/screengrab/setup.rb +24 -0
- data/sigh/README.md +17 -0
- data/sigh/lib/assets/resign.sh +909 -0
- data/sigh/lib/sigh.rb +4 -0
- data/sigh/lib/sigh/commands_generator.rb +154 -0
- data/sigh/lib/sigh/download_all.rb +112 -0
- data/sigh/lib/sigh/local_manage.rb +145 -0
- data/sigh/lib/sigh/manager.rb +47 -0
- data/sigh/lib/sigh/module.rb +42 -0
- data/sigh/lib/sigh/options.rb +187 -0
- data/sigh/lib/sigh/repair.rb +34 -0
- data/sigh/lib/sigh/resign.rb +220 -0
- data/sigh/lib/sigh/runner.rb +402 -0
- data/snapshot/README.md +17 -0
- data/snapshot/lib/assets/SnapfileTemplate +37 -0
- data/snapshot/lib/assets/SnapfileTemplate.swift +41 -0
- data/snapshot/lib/assets/SnapshotHelper.swift +301 -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 +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 +290 -0
- data/snapshot/lib/snapshot/page.html.erb +285 -0
- data/snapshot/lib/snapshot/reports_generator.rb +139 -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 +62 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +219 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +200 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_xcode_8.rb +113 -0
- data/snapshot/lib/snapshot/test_command_generator.rb +108 -0
- data/snapshot/lib/snapshot/test_command_generator_base.rb +128 -0
- data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +70 -0
- data/snapshot/lib/snapshot/update.rb +38 -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 +30 -0
- data/spaceship/lib/spaceship/base.rb +310 -0
- data/spaceship/lib/spaceship/client.rb +913 -0
- data/spaceship/lib/spaceship/commands_generator.rb +53 -0
- data/spaceship/lib/spaceship/connect_api.rb +116 -0
- data/spaceship/lib/spaceship/connect_api/api_client.rb +279 -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/age_rating_declaration.rb +114 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +388 -0
- data/spaceship/lib/spaceship/connect_api/models/app_category.rb +94 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +95 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +39 -0
- data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +131 -0
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +100 -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 +187 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +153 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_attachment.rb +71 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +51 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +217 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +85 -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 +26 -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_feedback.rb +75 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +41 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_screenshot.rb +18 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +57 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_tester_metric.rb +44 -0
- data/spaceship/lib/spaceship/connect_api/models/build.rb +172 -0
- data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +61 -0
- data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +36 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +58 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +71 -0
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +102 -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 +58 -0
- data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +41 -0
- data/spaceship/lib/spaceship/connect_api/models/pre_release_version.rb +20 -0
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +97 -0
- data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb +64 -0
- data/spaceship/lib/spaceship/connect_api/models/territory.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/user.rb +51 -0
- data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +59 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/client.rb +92 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +143 -0
- data/spaceship/lib/spaceship/connect_api/response.rb +67 -0
- data/spaceship/lib/spaceship/connect_api/spaceship.rb +102 -0
- data/spaceship/lib/spaceship/connect_api/testflight/client.rb +24 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +391 -0
- data/spaceship/lib/spaceship/connect_api/token.rb +102 -0
- data/spaceship/lib/spaceship/connect_api/token_refresh_middleware.rb +24 -0
- data/spaceship/lib/spaceship/connect_api/tunes/client.rb +24 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +1045 -0
- data/spaceship/lib/spaceship/connect_api/users/client.rb +24 -0
- data/spaceship/lib/spaceship/connect_api/users/users.rb +80 -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 +82 -0
- data/spaceship/lib/spaceship/globals.rb +12 -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 +365 -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 +74 -0
- data/spaceship/lib/spaceship/stats_middleware.rb +65 -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 +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/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 +35 -0
- data/spaceship/lib/spaceship/tunes/tunes_base.rb +17 -0
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +1644 -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 +346 -0
- data/spaceship/lib/spaceship/ui.rb +27 -0
- data/supply/README.md +17 -0
- data/supply/lib/supply.rb +53 -0
- data/supply/lib/supply/apk_listing.rb +14 -0
- data/supply/lib/supply/client.rb +551 -0
- data/supply/lib/supply/commands_generator.rb +67 -0
- data/supply/lib/supply/languages.rb +88 -0
- data/supply/lib/supply/listing.rb +32 -0
- data/supply/lib/supply/options.rb +324 -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 +480 -0
- metadata +1832 -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,595 @@
|
|
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
|
+
# As Apple recommends in Transporter User Guide we shouldn't specify the -t transport parameter
|
153
|
+
# and instead allow Transporter to use automatic transport discovery
|
154
|
+
# to determine the best transport mode for packages.
|
155
|
+
# It became crucial after WWDC 2020 as it leaded to "Broken pipe (Write failed)" exception
|
156
|
+
# More information https://github.com/fastlane/fastlane/issues/16749
|
157
|
+
env_deliver_additional_params = ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"]
|
158
|
+
if env_deliver_additional_params.to_s.strip.empty?
|
159
|
+
return nil
|
160
|
+
end
|
161
|
+
|
162
|
+
deliver_additional_params = env_deliver_additional_params.to_s.strip
|
163
|
+
if !deliver_additional_params.include?("-t ")
|
164
|
+
UI.user_error!("Invalid transport parameter")
|
165
|
+
else
|
166
|
+
return deliver_additional_params
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Generates commands and executes the iTMSTransporter through the shell script it provides by the same name
|
172
|
+
class ShellScriptTransporterExecutor < TransporterExecutor
|
173
|
+
def build_upload_command(username, password, source = "/tmp", provider_short_name = "", jwt = nil)
|
174
|
+
use_jwt = !jwt.to_s.empty?
|
175
|
+
[
|
176
|
+
'"' + Helper.transporter_path + '"',
|
177
|
+
"-m upload",
|
178
|
+
("-u #{username.shellescape}" unless use_jwt),
|
179
|
+
("-p #{shell_escaped_password(password)}" unless use_jwt),
|
180
|
+
("-jwt #{jwt}" if use_jwt),
|
181
|
+
"-f \"#{source}\"",
|
182
|
+
additional_upload_parameters, # that's here, because the user might overwrite the -t option
|
183
|
+
"-k 100000",
|
184
|
+
("-WONoPause true" if Helper.windows?), # Windows only: process instantly returns instead of waiting for key press
|
185
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?)
|
186
|
+
].compact.join(' ')
|
187
|
+
end
|
188
|
+
|
189
|
+
def build_download_command(username, password, apple_id, destination = "/tmp", provider_short_name = "", jwt = nil)
|
190
|
+
use_jwt = !jwt.to_s.empty?
|
191
|
+
[
|
192
|
+
'"' + Helper.transporter_path + '"',
|
193
|
+
"-m lookupMetadata",
|
194
|
+
("-u #{username.shellescape}" unless use_jwt),
|
195
|
+
("-p #{shell_escaped_password(password)}" unless use_jwt),
|
196
|
+
("-jwt #{jwt}" if use_jwt),
|
197
|
+
"-apple_id #{apple_id}",
|
198
|
+
"-destination '#{destination}'",
|
199
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?)
|
200
|
+
].compact.join(' ')
|
201
|
+
end
|
202
|
+
|
203
|
+
def build_provider_ids_command(username, password, jwt = nil)
|
204
|
+
use_jwt = !jwt.to_s.empty?
|
205
|
+
[
|
206
|
+
'"' + Helper.transporter_path + '"',
|
207
|
+
'-m provider',
|
208
|
+
("-u \"#{username.shellescape}\"" unless use_jwt),
|
209
|
+
("-p #{shell_escaped_password(password)}" unless use_jwt),
|
210
|
+
("-jwt #{jwt}" if use_jwt)
|
211
|
+
].compact.join(' ')
|
212
|
+
end
|
213
|
+
|
214
|
+
def handle_error(password)
|
215
|
+
# rubocop:disable Style/CaseEquality
|
216
|
+
# rubocop:disable Style/YodaCondition
|
217
|
+
unless /^[0-9a-zA-Z\.\$\_\-]*$/ === password
|
218
|
+
UI.error([
|
219
|
+
"Password contains special characters, which may not be handled properly by iTMSTransporter.",
|
220
|
+
"If you experience problems uploading to App Store Connect, please consider changing your password to something with only alphanumeric characters."
|
221
|
+
].join(' '))
|
222
|
+
end
|
223
|
+
# rubocop:enable Style/CaseEquality
|
224
|
+
# rubocop:enable Style/YodaCondition
|
225
|
+
|
226
|
+
UI.error("Could not download/upload from App Store Connect! It's probably related to your password or your internet connection.")
|
227
|
+
end
|
228
|
+
|
229
|
+
private
|
230
|
+
|
231
|
+
def shell_escaped_password(password)
|
232
|
+
password = password.shellescape
|
233
|
+
unless Helper.windows?
|
234
|
+
# because the shell handles passwords with single-quotes incorrectly, use `gsub` to replace `shellescape`'d single-quotes of this form:
|
235
|
+
# \'
|
236
|
+
# with a sequence that wraps the escaped single-quote in double-quotes:
|
237
|
+
# '"\'"'
|
238
|
+
# this allows us to properly handle passwords with single-quotes in them
|
239
|
+
# background: https://stackoverflow.com/questions/1250079/how-to-escape-single-quotes-within-single-quoted-strings/1250098#1250098
|
240
|
+
password = password.gsub("\\'") do
|
241
|
+
# we use the 'do' version of gsub, because two-param version interprets the replace text as a pattern and does the wrong thing
|
242
|
+
"'\"\\'\"'"
|
243
|
+
end
|
244
|
+
|
245
|
+
# 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)
|
246
|
+
password = "'" + password + "'"
|
247
|
+
end
|
248
|
+
return password
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
# Generates commands and executes the iTMSTransporter by invoking its Java app directly, to avoid the crazy parameter
|
253
|
+
# escaping problems in its accompanying shell script.
|
254
|
+
class JavaTransporterExecutor < TransporterExecutor
|
255
|
+
def build_upload_command(username, password, source = "/tmp", provider_short_name = "", jwt = nil)
|
256
|
+
use_jwt = !jwt.to_s.empty?
|
257
|
+
if Helper.mac? && Helper.xcode_at_least?(11)
|
258
|
+
[
|
259
|
+
("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" unless use_jwt),
|
260
|
+
'xcrun iTMSTransporter',
|
261
|
+
'-m upload',
|
262
|
+
("-u #{username.shellescape}" unless use_jwt),
|
263
|
+
("-p @env:ITMS_TRANSPORTER_PASSWORD" unless use_jwt),
|
264
|
+
("-jwt #{jwt}" if use_jwt),
|
265
|
+
"-f #{source.shellescape}",
|
266
|
+
additional_upload_parameters, # that's here, because the user might overwrite the -t option
|
267
|
+
'-k 100000',
|
268
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?),
|
269
|
+
'2>&1' # cause stderr to be written to stdout
|
270
|
+
].compact.join(' ') # compact gets rid of the possibly nil ENV value
|
271
|
+
else
|
272
|
+
[
|
273
|
+
Helper.transporter_java_executable_path.shellescape,
|
274
|
+
"-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
|
275
|
+
'-XX:NewSize=2m',
|
276
|
+
'-Xms32m',
|
277
|
+
'-Xmx1024m',
|
278
|
+
'-Xms1024m',
|
279
|
+
'-Djava.awt.headless=true',
|
280
|
+
'-Dsun.net.http.retryPost=false',
|
281
|
+
java_code_option,
|
282
|
+
'-m upload',
|
283
|
+
("-u #{username.shellescape}" unless use_jwt),
|
284
|
+
("-p #{password.shellescape}" unless use_jwt),
|
285
|
+
("-jwt #{jwt}" if use_jwt),
|
286
|
+
"-f #{source.shellescape}",
|
287
|
+
additional_upload_parameters, # that's here, because the user might overwrite the -t option
|
288
|
+
'-k 100000',
|
289
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?),
|
290
|
+
'2>&1' # cause stderr to be written to stdout
|
291
|
+
].compact.join(' ') # compact gets rid of the possibly nil ENV value
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
def build_download_command(username, password, apple_id, destination = "/tmp", provider_short_name = "", jwt = nil)
|
296
|
+
use_jwt = !jwt.to_s.empty?
|
297
|
+
if Helper.mac? && Helper.xcode_at_least?(11)
|
298
|
+
[
|
299
|
+
("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" unless use_jwt),
|
300
|
+
'xcrun iTMSTransporter',
|
301
|
+
'-m lookupMetadata',
|
302
|
+
("-u #{username.shellescape}" unless use_jwt),
|
303
|
+
("-p @env:ITMS_TRANSPORTER_PASSWORD" unless use_jwt),
|
304
|
+
("-jwt #{jwt}" if use_jwt),
|
305
|
+
"-apple_id #{apple_id.shellescape}",
|
306
|
+
"-destination #{destination.shellescape}",
|
307
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?),
|
308
|
+
'2>&1' # cause stderr to be written to stdout
|
309
|
+
].compact.join(' ')
|
310
|
+
else
|
311
|
+
[
|
312
|
+
Helper.transporter_java_executable_path.shellescape,
|
313
|
+
"-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
|
314
|
+
'-XX:NewSize=2m',
|
315
|
+
'-Xms32m',
|
316
|
+
'-Xmx1024m',
|
317
|
+
'-Xms1024m',
|
318
|
+
'-Djava.awt.headless=true',
|
319
|
+
'-Dsun.net.http.retryPost=false',
|
320
|
+
java_code_option,
|
321
|
+
'-m lookupMetadata',
|
322
|
+
("-u #{username.shellescape}" unless use_jwt),
|
323
|
+
("-p #{password.shellescape}" unless use_jwt),
|
324
|
+
("-jwt #{jwt}" if use_jwt),
|
325
|
+
"-apple_id #{apple_id.shellescape}",
|
326
|
+
"-destination #{destination.shellescape}",
|
327
|
+
("-itc_provider #{provider_short_name}" if jwt.nil? && !provider_short_name.to_s.empty?),
|
328
|
+
'2>&1' # cause stderr to be written to stdout
|
329
|
+
].compact.join(' ')
|
330
|
+
end
|
331
|
+
end
|
332
|
+
|
333
|
+
def build_provider_ids_command(username, password, jwt = nil)
|
334
|
+
use_jwt = !jwt.to_s.empty?
|
335
|
+
if Helper.mac? && Helper.xcode_at_least?(11)
|
336
|
+
[
|
337
|
+
("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" unless use_jwt),
|
338
|
+
'xcrun iTMSTransporter',
|
339
|
+
'-m provider',
|
340
|
+
("-u #{username.shellescape}" unless use_jwt),
|
341
|
+
("-p @env:ITMS_TRANSPORTER_PASSWORD" unless use_jwt),
|
342
|
+
("-jwt #{jwt}" if use_jwt),
|
343
|
+
'2>&1' # cause stderr to be written to stdout
|
344
|
+
].compact.join(' ')
|
345
|
+
else
|
346
|
+
[
|
347
|
+
Helper.transporter_java_executable_path.shellescape,
|
348
|
+
"-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
|
349
|
+
'-XX:NewSize=2m',
|
350
|
+
'-Xms32m',
|
351
|
+
'-Xmx1024m',
|
352
|
+
'-Xms1024m',
|
353
|
+
'-Djava.awt.headless=true',
|
354
|
+
'-Dsun.net.http.retryPost=false',
|
355
|
+
java_code_option,
|
356
|
+
'-m provider',
|
357
|
+
("-u #{username.shellescape}" unless use_jwt),
|
358
|
+
("-p #{password.shellescape}" unless use_jwt),
|
359
|
+
("-jwt #{jwt}" if use_jwt),
|
360
|
+
'2>&1' # cause stderr to be written to stdout
|
361
|
+
].compact.join(' ')
|
362
|
+
end
|
363
|
+
end
|
364
|
+
|
365
|
+
def java_code_option
|
366
|
+
if Helper.mac? && Helper.xcode_at_least?(9)
|
367
|
+
return "-jar #{Helper.transporter_java_jar_path.shellescape}"
|
368
|
+
else
|
369
|
+
return "-classpath #{Helper.transporter_java_jar_path.shellescape} com.apple.transporter.Application"
|
370
|
+
end
|
371
|
+
end
|
372
|
+
|
373
|
+
def handle_error(password)
|
374
|
+
unless File.exist?(Helper.transporter_java_jar_path)
|
375
|
+
UI.error("The iTMSTransporter Java app was not found at '#{Helper.transporter_java_jar_path}'.")
|
376
|
+
UI.error("If you're using Xcode 6, please select the shell script executor by setting the environment variable "\
|
377
|
+
"FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT=1")
|
378
|
+
end
|
379
|
+
end
|
380
|
+
|
381
|
+
def execute(command, hide_output)
|
382
|
+
# The Java command needs to be run starting in a working directory in the iTMSTransporter
|
383
|
+
# file area. The shell script takes care of changing directories over to there, but we'll
|
384
|
+
# handle it manually here for this strategy.
|
385
|
+
FileUtils.cd(Helper.itms_path) do
|
386
|
+
return super(command, hide_output)
|
387
|
+
end
|
388
|
+
end
|
389
|
+
end
|
390
|
+
|
391
|
+
class ItunesTransporter
|
392
|
+
# Matches a line in the provider table: "12 Initech Systems Inc LG89CQY559"
|
393
|
+
PROVIDER_REGEX = /^\d+\s{2,}.+\s{2,}[^\s]+$/
|
394
|
+
TWO_STEP_HOST_PREFIX = "deliver.appspecific"
|
395
|
+
|
396
|
+
# This will be called from the Deliverfile, and disables the logging of the transporter output
|
397
|
+
def self.hide_transporter_output
|
398
|
+
@hide_transporter_output = !FastlaneCore::Globals.verbose?
|
399
|
+
end
|
400
|
+
|
401
|
+
def self.hide_transporter_output?
|
402
|
+
@hide_transporter_output
|
403
|
+
end
|
404
|
+
|
405
|
+
# Returns a new instance of the iTunesTransporter.
|
406
|
+
# If no username or password given, it will be taken from
|
407
|
+
# the #{CredentialsManager::AccountManager}
|
408
|
+
# @param use_shell_script if true, forces use of the iTMSTransporter shell script.
|
409
|
+
# if false, allows a direct call to the iTMSTransporter Java app (preferred).
|
410
|
+
# see: https://github.com/fastlane/fastlane/pull/4003
|
411
|
+
# @param provider_short_name The provider short name to be given to the iTMSTransporter to identify the
|
412
|
+
# correct team for this work. The provider short name is usually your Developer
|
413
|
+
# Portal team ID, but in certain cases it is different!
|
414
|
+
# see: https://github.com/fastlane/fastlane/issues/1524#issuecomment-196370628
|
415
|
+
# for more information about how to use the iTMSTransporter to list your provider
|
416
|
+
# short names
|
417
|
+
def initialize(user = nil, password = nil, use_shell_script = false, provider_short_name = nil, jwt = nil)
|
418
|
+
# Xcode 6.x doesn't have the same iTMSTransporter Java setup as later Xcode versions, so
|
419
|
+
# we can't default to using the newer direct Java invocation strategy for those versions.
|
420
|
+
use_shell_script ||= Helper.is_mac? && Helper.xcode_version.start_with?('6.')
|
421
|
+
use_shell_script ||= Helper.windows?
|
422
|
+
use_shell_script ||= Feature.enabled?('FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT')
|
423
|
+
|
424
|
+
if jwt.to_s.empty?
|
425
|
+
@user = user
|
426
|
+
@password = password || load_password_for_transporter
|
427
|
+
end
|
428
|
+
|
429
|
+
@jwt = jwt
|
430
|
+
|
431
|
+
@transporter_executor = use_shell_script ? ShellScriptTransporterExecutor.new : JavaTransporterExecutor.new
|
432
|
+
@provider_short_name = provider_short_name
|
433
|
+
end
|
434
|
+
|
435
|
+
# Downloads the latest version of the app metadata package from iTC.
|
436
|
+
# @param app_id [Integer] The unique App ID
|
437
|
+
# @param dir [String] the path in which the package file should be stored
|
438
|
+
# @return (Bool) True if everything worked fine
|
439
|
+
# @raise [Deliver::TransporterTransferError] when something went wrong
|
440
|
+
# when transferring
|
441
|
+
def download(app_id, dir = nil)
|
442
|
+
dir ||= "/tmp"
|
443
|
+
|
444
|
+
password_placeholder = @jwt.nil? ? 'YourPassword' : nil
|
445
|
+
jwt_placeholder = @jwt.nil? ? nil : 'YourJWT'
|
446
|
+
|
447
|
+
UI.message("Going to download app metadata from App Store Connect")
|
448
|
+
command = @transporter_executor.build_download_command(@user, @password, app_id, dir, @provider_short_name, @jwt)
|
449
|
+
UI.verbose(@transporter_executor.build_download_command(@user, password_placeholder, app_id, dir, @provider_short_name, jwt_placeholder))
|
450
|
+
|
451
|
+
begin
|
452
|
+
result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
|
453
|
+
rescue TransporterRequiresApplicationSpecificPasswordError => ex
|
454
|
+
handle_two_step_failure(ex)
|
455
|
+
return download(app_id, dir)
|
456
|
+
end
|
457
|
+
|
458
|
+
return result if Helper.test?
|
459
|
+
|
460
|
+
itmsp_path = File.join(dir, "#{app_id}.itmsp")
|
461
|
+
successful = result && File.directory?(itmsp_path)
|
462
|
+
|
463
|
+
if successful
|
464
|
+
UI.success("✅ Successfully downloaded the latest package from App Store Connect to #{itmsp_path}")
|
465
|
+
else
|
466
|
+
handle_error(@password)
|
467
|
+
end
|
468
|
+
|
469
|
+
successful
|
470
|
+
end
|
471
|
+
|
472
|
+
# Uploads the modified package back to App Store Connect
|
473
|
+
# @param app_id [Integer] The unique App ID
|
474
|
+
# @param dir [String] the path in which the package file is located
|
475
|
+
# @return (Bool) True if everything worked fine
|
476
|
+
# @raise [Deliver::TransporterTransferError] when something went wrong
|
477
|
+
# when transferring
|
478
|
+
def upload(app_id, dir)
|
479
|
+
actual_dir = File.join(dir, "#{app_id}.itmsp")
|
480
|
+
|
481
|
+
UI.message("Going to upload updated app to App Store Connect")
|
482
|
+
UI.success("This might take a few minutes. Please don't interrupt the script.")
|
483
|
+
|
484
|
+
password_placeholder = @jwt.nil? ? 'YourPassword' : nil
|
485
|
+
jwt_placeholder = @jwt.nil? ? nil : 'YourJWT'
|
486
|
+
|
487
|
+
command = @transporter_executor.build_upload_command(@user, @password, actual_dir, @provider_short_name, @jwt)
|
488
|
+
UI.verbose(@transporter_executor.build_upload_command(@user, password_placeholder, actual_dir, @provider_short_name, jwt_placeholder))
|
489
|
+
|
490
|
+
begin
|
491
|
+
result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
|
492
|
+
rescue TransporterRequiresApplicationSpecificPasswordError => ex
|
493
|
+
handle_two_step_failure(ex)
|
494
|
+
return upload(app_id, dir)
|
495
|
+
end
|
496
|
+
|
497
|
+
if result
|
498
|
+
UI.header("Successfully uploaded package to App Store Connect. It might take a few minutes until it's visible online.")
|
499
|
+
|
500
|
+
FileUtils.rm_rf(actual_dir) unless Helper.test? # we don't need the package any more, since the upload was successful
|
501
|
+
else
|
502
|
+
handle_error(@password)
|
503
|
+
end
|
504
|
+
|
505
|
+
result
|
506
|
+
end
|
507
|
+
|
508
|
+
def provider_ids
|
509
|
+
password_placeholder = @jwt.nil? ? 'YourPassword' : nil
|
510
|
+
jwt_placeholder = @jwt.nil? ? nil : 'YourJWT'
|
511
|
+
|
512
|
+
command = @transporter_executor.build_provider_ids_command(@user, @password, @jwt)
|
513
|
+
UI.verbose(@transporter_executor.build_provider_ids_command(@user, password_placeholder, jwt_placeholder))
|
514
|
+
|
515
|
+
lines = []
|
516
|
+
begin
|
517
|
+
result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?) { |xs| lines = xs }
|
518
|
+
return result if Helper.test?
|
519
|
+
rescue TransporterRequiresApplicationSpecificPasswordError => ex
|
520
|
+
handle_two_step_failure(ex)
|
521
|
+
return provider_ids
|
522
|
+
end
|
523
|
+
|
524
|
+
lines.map { |line| provider_pair(line) }.compact.to_h
|
525
|
+
end
|
526
|
+
|
527
|
+
private
|
528
|
+
|
529
|
+
TWO_FACTOR_ENV_VARIABLE = "FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD"
|
530
|
+
|
531
|
+
# Returns the password to be used with the transporter
|
532
|
+
def load_password_for_transporter
|
533
|
+
# 3 different sources for the password
|
534
|
+
# 1) ENV variable for application specific password
|
535
|
+
if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0
|
536
|
+
UI.message("Fetching password for transporter from environment variable named `#{TWO_FACTOR_ENV_VARIABLE}`")
|
537
|
+
return ENV[TWO_FACTOR_ENV_VARIABLE]
|
538
|
+
end
|
539
|
+
# 2) TWO_STEP_HOST_PREFIX from keychain
|
540
|
+
account_manager = CredentialsManager::AccountManager.new(user: @user,
|
541
|
+
prefix: TWO_STEP_HOST_PREFIX,
|
542
|
+
note: "application-specific")
|
543
|
+
password = account_manager.password(ask_if_missing: false)
|
544
|
+
return password if password.to_s.length > 0
|
545
|
+
# 3) standard iTC password
|
546
|
+
account_manager = CredentialsManager::AccountManager.new(user: @user)
|
547
|
+
return account_manager.password(ask_if_missing: true)
|
548
|
+
end
|
549
|
+
|
550
|
+
# Tells the user how to get an application specific password
|
551
|
+
def handle_two_step_failure(ex)
|
552
|
+
if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0
|
553
|
+
# Password provided, however we already used it
|
554
|
+
UI.error("")
|
555
|
+
UI.error("Application specific password you provided using")
|
556
|
+
UI.error("environment variable #{TWO_FACTOR_ENV_VARIABLE}")
|
557
|
+
UI.error("is invalid, please make sure it's correct")
|
558
|
+
UI.error("")
|
559
|
+
UI.user_error!("Invalid application specific password provided")
|
560
|
+
end
|
561
|
+
|
562
|
+
a = CredentialsManager::AccountManager.new(user: @user,
|
563
|
+
prefix: TWO_STEP_HOST_PREFIX,
|
564
|
+
note: "application-specific")
|
565
|
+
if a.password(ask_if_missing: false).to_s.length > 0
|
566
|
+
# user already entered one.. delete the old one
|
567
|
+
UI.error("Application specific password seems wrong")
|
568
|
+
UI.error("Please make sure to follow the instructions")
|
569
|
+
a.remove_from_keychain
|
570
|
+
end
|
571
|
+
UI.error("")
|
572
|
+
UI.error("Your account has 2 step verification enabled")
|
573
|
+
UI.error("Please go to https://appleid.apple.com/account/manage")
|
574
|
+
UI.error("and generate an application specific password for")
|
575
|
+
UI.error("the iTunes Transporter, which is used to upload builds")
|
576
|
+
UI.error("")
|
577
|
+
UI.error("To set the application specific password on a CI machine using")
|
578
|
+
UI.error("an environment variable, you can set the")
|
579
|
+
UI.error("#{TWO_FACTOR_ENV_VARIABLE} variable")
|
580
|
+
@password = a.password(ask_if_missing: true) # to ask the user for the missing value
|
581
|
+
|
582
|
+
return true
|
583
|
+
end
|
584
|
+
|
585
|
+
def handle_error(password)
|
586
|
+
@transporter_executor.handle_error(password)
|
587
|
+
end
|
588
|
+
|
589
|
+
def provider_pair(line)
|
590
|
+
line = line.strip
|
591
|
+
return nil unless line =~ PROVIDER_REGEX
|
592
|
+
line.split(/\s{2,}/).drop(1)
|
593
|
+
end
|
594
|
+
end
|
595
|
+
end
|