fastlane_pricing_fix 2.212.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +1 -0
- data/LICENSE +21 -0
- data/README.md +235 -0
- data/bin/bin-proxy +19 -0
- data/bin/fastlane +23 -0
- data/cert/README.md +17 -0
- data/cert/lib/cert/commands_generator.rb +61 -0
- data/cert/lib/cert/module.rb +16 -0
- data/cert/lib/cert/options.rb +133 -0
- data/cert/lib/cert/runner.rb +250 -0
- data/cert/lib/cert.rb +4 -0
- data/credentials_manager/README.md +64 -0
- data/credentials_manager/lib/credentials_manager/account_manager.rb +157 -0
- data/credentials_manager/lib/credentials_manager/appfile_config.rb +196 -0
- data/credentials_manager/lib/credentials_manager/cli.rb +69 -0
- data/credentials_manager/lib/credentials_manager.rb +7 -0
- data/deliver/README.md +17 -0
- data/deliver/lib/assets/DeliverfileDefault +3 -0
- data/deliver/lib/assets/DeliverfileDefault.swift +13 -0
- data/deliver/lib/assets/ScreenshotsHelp +30 -0
- data/deliver/lib/assets/summary.html.erb +299 -0
- data/deliver/lib/deliver/app_screenshot.rb +387 -0
- data/deliver/lib/deliver/app_screenshot_iterator.rb +95 -0
- data/deliver/lib/deliver/app_screenshot_validator.rb +108 -0
- data/deliver/lib/deliver/commands_generator.rb +191 -0
- data/deliver/lib/deliver/detect_values.rb +104 -0
- data/deliver/lib/deliver/download_screenshots.rb +75 -0
- data/deliver/lib/deliver/generate_summary.rb +13 -0
- data/deliver/lib/deliver/html_generator.rb +78 -0
- data/deliver/lib/deliver/languages.rb +7 -0
- data/deliver/lib/deliver/loader.rb +157 -0
- data/deliver/lib/deliver/module.rb +24 -0
- data/deliver/lib/deliver/options.rb +461 -0
- data/deliver/lib/deliver/runner.rb +310 -0
- data/deliver/lib/deliver/screenshot_comparable.rb +62 -0
- data/deliver/lib/deliver/setup.rb +203 -0
- data/deliver/lib/deliver/submit_for_review.rb +236 -0
- data/deliver/lib/deliver/sync_screenshots.rb +200 -0
- data/deliver/lib/deliver/upload_metadata.rb +699 -0
- data/deliver/lib/deliver/upload_price_tier.rb +42 -0
- data/deliver/lib/deliver/upload_screenshots.rb +271 -0
- data/deliver/lib/deliver.rb +15 -0
- data/fastlane/README.md +11 -0
- data/fastlane/lib/assets/ActionDetails.md.erb +106 -0
- data/fastlane/lib/assets/Actions.md.erb +43 -0
- data/fastlane/lib/assets/AppfileTemplate +6 -0
- data/fastlane/lib/assets/AppfileTemplate.swift +7 -0
- data/fastlane/lib/assets/AppfileTemplateAndroid +2 -0
- data/fastlane/lib/assets/DefaultFastfileTemplate +20 -0
- data/fastlane/lib/assets/DefaultFastfileTemplate.swift +13 -0
- data/fastlane/lib/assets/completions/completion.bash +26 -0
- data/fastlane/lib/assets/completions/completion.fish +39 -0
- data/fastlane/lib/assets/completions/completion.sh +12 -0
- data/fastlane/lib/assets/completions/completion.zsh +24 -0
- data/fastlane/lib/assets/custom_action_template.rb +82 -0
- data/fastlane/lib/assets/mailgun_html_template.erb +142 -0
- data/fastlane/lib/assets/report_template.xml.erb +15 -0
- data/fastlane/lib/assets/s3_html_template.erb +105 -0
- data/fastlane/lib/assets/s3_plist_template.erb +31 -0
- data/fastlane/lib/assets/s3_version_template.erb +4 -0
- data/fastlane/lib/fastlane/action.rb +198 -0
- data/fastlane/lib/fastlane/action_collector.rb +35 -0
- data/fastlane/lib/fastlane/actions/README.md +5 -0
- data/fastlane/lib/fastlane/actions/actions_helper.rb +185 -0
- data/fastlane/lib/fastlane/actions/adb.rb +75 -0
- data/fastlane/lib/fastlane/actions/adb_devices.rb +70 -0
- data/fastlane/lib/fastlane/actions/add_extra_platforms.rb +45 -0
- data/fastlane/lib/fastlane/actions/add_git_tag.rb +138 -0
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +255 -0
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +148 -0
- data/fastlane/lib/fastlane/actions/appaloosa.rb +271 -0
- data/fastlane/lib/fastlane/actions/appetize.rb +193 -0
- data/fastlane/lib/fastlane/actions/appetize_viewing_url_generator.rb +135 -0
- data/fastlane/lib/fastlane/actions/appium.rb +181 -0
- data/fastlane/lib/fastlane/actions/appledoc.rb +226 -0
- data/fastlane/lib/fastlane/actions/appstore.rb +14 -0
- data/fastlane/lib/fastlane/actions/apteligent.rb +106 -0
- data/fastlane/lib/fastlane/actions/artifactory.rb +189 -0
- data/fastlane/lib/fastlane/actions/automatic_code_signing.rb +220 -0
- data/fastlane/lib/fastlane/actions/backup_file.rb +41 -0
- data/fastlane/lib/fastlane/actions/backup_xcarchive.rb +135 -0
- data/fastlane/lib/fastlane/actions/badge.rb +151 -0
- data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +113 -0
- data/fastlane/lib/fastlane/actions/build_android_app.rb +14 -0
- data/fastlane/lib/fastlane/actions/build_app.rb +171 -0
- data/fastlane/lib/fastlane/actions/build_ios_app.rb +47 -0
- data/fastlane/lib/fastlane/actions/build_mac_app.rb +46 -0
- data/fastlane/lib/fastlane/actions/bundle_install.rb +166 -0
- data/fastlane/lib/fastlane/actions/capture_android_screenshots.rb +63 -0
- data/fastlane/lib/fastlane/actions/capture_ios_screenshots.rb +61 -0
- data/fastlane/lib/fastlane/actions/capture_screenshots.rb +14 -0
- data/fastlane/lib/fastlane/actions/carthage.rb +238 -0
- data/fastlane/lib/fastlane/actions/cert.rb +14 -0
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +188 -0
- data/fastlane/lib/fastlane/actions/chatwork.rb +95 -0
- data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +62 -0
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +71 -0
- data/fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb +75 -0
- data/fastlane/lib/fastlane/actions/clear_derived_data.rb +70 -0
- data/fastlane/lib/fastlane/actions/clipboard.rb +49 -0
- data/fastlane/lib/fastlane/actions/cloc.rb +85 -0
- data/fastlane/lib/fastlane/actions/cocoapods.rb +178 -0
- data/fastlane/lib/fastlane/actions/commit_github_file.rb +194 -0
- data/fastlane/lib/fastlane/actions/commit_version_bump.rb +300 -0
- data/fastlane/lib/fastlane/actions/copy_artifacts.rb +113 -0
- data/fastlane/lib/fastlane/actions/create_app_on_managed_play_store.rb +168 -0
- data/fastlane/lib/fastlane/actions/create_app_online.rb +75 -0
- data/fastlane/lib/fastlane/actions/create_keychain.rb +179 -0
- data/fastlane/lib/fastlane/actions/create_pull_request.rb +271 -0
- data/fastlane/lib/fastlane/actions/create_xcframework.rb +203 -0
- data/fastlane/lib/fastlane/actions/danger.rb +146 -0
- data/fastlane/lib/fastlane/actions/debug.rb +32 -0
- data/fastlane/lib/fastlane/actions/default_platform.rb +47 -0
- data/fastlane/lib/fastlane/actions/delete_keychain.rb +68 -0
- data/fastlane/lib/fastlane/actions/deliver.rb +14 -0
- data/fastlane/lib/fastlane/actions/deploygate.rb +209 -0
- data/fastlane/lib/fastlane/actions/device_grid/README.md +157 -0
- data/fastlane/lib/fastlane/actions/docs/build_app.md +245 -0
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +349 -0
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +375 -0
- data/fastlane/lib/fastlane/actions/docs/check_app_store_metadata.md +103 -0
- data/fastlane/lib/fastlane/actions/docs/create_app_online.md +386 -0
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +366 -0
- data/fastlane/lib/fastlane/actions/docs/get_certificates.md +86 -0
- data/fastlane/lib/fastlane/actions/docs/get_provisioning_profile.md +223 -0
- data/fastlane/lib/fastlane/actions/docs/get_push_certificate.md +134 -0
- data/fastlane/lib/fastlane/actions/docs/run_tests.md +151 -0
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +579 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +748 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +204 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +260 -0
- data/fastlane/lib/fastlane/actions/dotgpg_environment.rb +57 -0
- data/fastlane/lib/fastlane/actions/download.rb +76 -0
- data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +142 -0
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +373 -0
- data/fastlane/lib/fastlane/actions/download_from_play_store.rb +61 -0
- data/fastlane/lib/fastlane/actions/dsym_zip.rb +93 -0
- data/fastlane/lib/fastlane/actions/echo.rb +14 -0
- data/fastlane/lib/fastlane/actions/ensure_bundle_exec.rb +59 -0
- data/fastlane/lib/fastlane/actions/ensure_env_vars.rb +54 -0
- data/fastlane/lib/fastlane/actions/ensure_git_branch.rb +68 -0
- data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +102 -0
- data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +133 -0
- data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +124 -0
- data/fastlane/lib/fastlane/actions/environment_variable.rb +69 -0
- data/fastlane/lib/fastlane/actions/erb.rb +93 -0
- data/fastlane/lib/fastlane/actions/fastlane_version.rb +15 -0
- data/fastlane/lib/fastlane/actions/flock.rb +82 -0
- data/fastlane/lib/fastlane/actions/frame_screenshots.rb +64 -0
- data/fastlane/lib/fastlane/actions/frameit.rb +14 -0
- data/fastlane/lib/fastlane/actions/gcovr.rb +163 -0
- data/fastlane/lib/fastlane/actions/get_build_number.rb +106 -0
- data/fastlane/lib/fastlane/actions/get_build_number_repository.rb +120 -0
- data/fastlane/lib/fastlane/actions/get_certificates.rb +81 -0
- data/fastlane/lib/fastlane/actions/get_github_release.rb +176 -0
- data/fastlane/lib/fastlane/actions/get_info_plist_value.rb +78 -0
- data/fastlane/lib/fastlane/actions/get_ipa_info_plist_value.rb +81 -0
- data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +117 -0
- data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +109 -0
- data/fastlane/lib/fastlane/actions/get_push_certificate.rb +87 -0
- data/fastlane/lib/fastlane/actions/get_version_number.rb +212 -0
- data/fastlane/lib/fastlane/actions/git_add.rb +88 -0
- data/fastlane/lib/fastlane/actions/git_branch.rb +55 -0
- data/fastlane/lib/fastlane/actions/git_commit.rb +80 -0
- data/fastlane/lib/fastlane/actions/git_pull.rb +58 -0
- data/fastlane/lib/fastlane/actions/git_remote_branch.rb +57 -0
- data/fastlane/lib/fastlane/actions/git_submodule_update.rb +60 -0
- data/fastlane/lib/fastlane/actions/git_tag_exists.rb +78 -0
- data/fastlane/lib/fastlane/actions/github_api.rb +271 -0
- data/fastlane/lib/fastlane/actions/google_play_track_release_names.rb +74 -0
- data/fastlane/lib/fastlane/actions/google_play_track_version_codes.rb +77 -0
- data/fastlane/lib/fastlane/actions/gradle.rb +334 -0
- data/fastlane/lib/fastlane/actions/gym.rb +10 -0
- data/fastlane/lib/fastlane/actions/hg_add_tag.rb +48 -0
- data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +183 -0
- data/fastlane/lib/fastlane/actions/hg_ensure_clean_status.rb +53 -0
- data/fastlane/lib/fastlane/actions/hg_push.rb +64 -0
- data/fastlane/lib/fastlane/actions/hipchat.rb +200 -0
- data/fastlane/lib/fastlane/actions/hockey.rb +399 -0
- data/fastlane/lib/fastlane/actions/ifttt.rb +93 -0
- data/fastlane/lib/fastlane/actions/import.rb +49 -0
- data/fastlane/lib/fastlane/actions/import_certificate.rb +77 -0
- data/fastlane/lib/fastlane/actions/import_from_git.rb +81 -0
- data/fastlane/lib/fastlane/actions/increment_build_number.rb +123 -0
- data/fastlane/lib/fastlane/actions/increment_version_number.rb +180 -0
- data/fastlane/lib/fastlane/actions/install_on_device.rb +92 -0
- data/fastlane/lib/fastlane/actions/install_provisioning_profile.rb +62 -0
- data/fastlane/lib/fastlane/actions/install_xcode_plugin.rb +91 -0
- data/fastlane/lib/fastlane/actions/installr.rb +129 -0
- data/fastlane/lib/fastlane/actions/ipa.rb +246 -0
- data/fastlane/lib/fastlane/actions/is_ci.rb +51 -0
- data/fastlane/lib/fastlane/actions/jazzy.rb +59 -0
- data/fastlane/lib/fastlane/actions/jira.rb +162 -0
- data/fastlane/lib/fastlane/actions/lane_context.rb +60 -0
- data/fastlane/lib/fastlane/actions/last_git_commit.rb +58 -0
- data/fastlane/lib/fastlane/actions/last_git_tag.rb +60 -0
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +154 -0
- data/fastlane/lib/fastlane/actions/lcov.rb +98 -0
- data/fastlane/lib/fastlane/actions/mailgun.rb +191 -0
- data/fastlane/lib/fastlane/actions/make_changelog_from_jenkins.rb +81 -0
- data/fastlane/lib/fastlane/actions/match.rb +14 -0
- data/fastlane/lib/fastlane/actions/match_nuke.rb +59 -0
- data/fastlane/lib/fastlane/actions/min_fastlane_version.rb +57 -0
- data/fastlane/lib/fastlane/actions/modify_services.rb +208 -0
- data/fastlane/lib/fastlane/actions/nexus_upload.rb +231 -0
- data/fastlane/lib/fastlane/actions/notarize.rb +340 -0
- data/fastlane/lib/fastlane/actions/notification.rb +75 -0
- data/fastlane/lib/fastlane/actions/notify.rb +40 -0
- data/fastlane/lib/fastlane/actions/number_of_commits.rb +75 -0
- data/fastlane/lib/fastlane/actions/oclint.rb +270 -0
- data/fastlane/lib/fastlane/actions/onesignal.rb +196 -0
- data/fastlane/lib/fastlane/actions/opt_out_crash_reporting.rb +33 -0
- data/fastlane/lib/fastlane/actions/opt_out_usage.rb +40 -0
- data/fastlane/lib/fastlane/actions/pem.rb +14 -0
- data/fastlane/lib/fastlane/actions/pilot.rb +14 -0
- data/fastlane/lib/fastlane/actions/pod_lib_lint.rb +189 -0
- data/fastlane/lib/fastlane/actions/pod_push.rb +198 -0
- data/fastlane/lib/fastlane/actions/podio_item.rb +210 -0
- data/fastlane/lib/fastlane/actions/precheck.rb +14 -0
- data/fastlane/lib/fastlane/actions/println.rb +14 -0
- data/fastlane/lib/fastlane/actions/produce.rb +14 -0
- data/fastlane/lib/fastlane/actions/prompt.rb +118 -0
- data/fastlane/lib/fastlane/actions/push_git_tags.rb +76 -0
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +138 -0
- data/fastlane/lib/fastlane/actions/puts.rb +67 -0
- data/fastlane/lib/fastlane/actions/read_podspec.rb +90 -0
- data/fastlane/lib/fastlane/actions/recreate_schemes.rb +46 -0
- data/fastlane/lib/fastlane/actions/register_device.rb +148 -0
- data/fastlane/lib/fastlane/actions/register_devices.rb +211 -0
- data/fastlane/lib/fastlane/actions/reset_git_repo.rb +118 -0
- data/fastlane/lib/fastlane/actions/reset_simulator_contents.rb +90 -0
- data/fastlane/lib/fastlane/actions/resign.rb +125 -0
- data/fastlane/lib/fastlane/actions/restore_file.rb +44 -0
- data/fastlane/lib/fastlane/actions/rocket.rb +83 -0
- data/fastlane/lib/fastlane/actions/rsync.rb +71 -0
- data/fastlane/lib/fastlane/actions/ruby_version.rb +56 -0
- data/fastlane/lib/fastlane/actions/run_tests.rb +124 -0
- data/fastlane/lib/fastlane/actions/s3.rb +174 -0
- data/fastlane/lib/fastlane/actions/say.rb +55 -0
- data/fastlane/lib/fastlane/actions/scan.rb +14 -0
- data/fastlane/lib/fastlane/actions/scp.rb +108 -0
- data/fastlane/lib/fastlane/actions/screengrab.rb +14 -0
- data/fastlane/lib/fastlane/actions/set_build_number_repository.rb +76 -0
- data/fastlane/lib/fastlane/actions/set_changelog.rb +201 -0
- data/fastlane/lib/fastlane/actions/set_github_release.rb +287 -0
- data/fastlane/lib/fastlane/actions/set_info_plist_value.rb +92 -0
- data/fastlane/lib/fastlane/actions/set_pod_key.rb +77 -0
- data/fastlane/lib/fastlane/actions/setup_ci.rb +140 -0
- data/fastlane/lib/fastlane/actions/setup_circle_ci.rb +58 -0
- data/fastlane/lib/fastlane/actions/setup_jenkins.rb +197 -0
- data/fastlane/lib/fastlane/actions/setup_travis.rb +57 -0
- data/fastlane/lib/fastlane/actions/sh.rb +69 -0
- data/fastlane/lib/fastlane/actions/sigh.rb +14 -0
- data/fastlane/lib/fastlane/actions/skip_docs.rb +52 -0
- data/fastlane/lib/fastlane/actions/slack.rb +307 -0
- data/fastlane/lib/fastlane/actions/slather.rb +319 -0
- data/fastlane/lib/fastlane/actions/snapshot.rb +14 -0
- data/fastlane/lib/fastlane/actions/sonar.rb +170 -0
- data/fastlane/lib/fastlane/actions/sourcedocs.rb +128 -0
- data/fastlane/lib/fastlane/actions/spaceship_logs.rb +135 -0
- data/fastlane/lib/fastlane/actions/spaceship_stats.rb +73 -0
- data/fastlane/lib/fastlane/actions/splunkmint.rb +156 -0
- data/fastlane/lib/fastlane/actions/spm.rb +144 -0
- data/fastlane/lib/fastlane/actions/ssh.rb +157 -0
- data/fastlane/lib/fastlane/actions/supply.rb +14 -0
- data/fastlane/lib/fastlane/actions/swiftlint.rb +242 -0
- data/fastlane/lib/fastlane/actions/sync_code_signing.rb +114 -0
- data/fastlane/lib/fastlane/actions/team_id.rb +42 -0
- data/fastlane/lib/fastlane/actions/team_name.rb +42 -0
- data/fastlane/lib/fastlane/actions/testfairy.rb +284 -0
- data/fastlane/lib/fastlane/actions/testflight.rb +14 -0
- data/fastlane/lib/fastlane/actions/trainer.rb +49 -0
- data/fastlane/lib/fastlane/actions/tryouts.rb +148 -0
- data/fastlane/lib/fastlane/actions/twitter.rb +84 -0
- data/fastlane/lib/fastlane/actions/typetalk.rb +93 -0
- data/fastlane/lib/fastlane/actions/unlock_keychain.rb +132 -0
- data/fastlane/lib/fastlane/actions/update_app_group_identifiers.rb +88 -0
- data/fastlane/lib/fastlane/actions/update_app_identifier.rb +124 -0
- data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +223 -0
- data/fastlane/lib/fastlane/actions/update_fastlane.rb +158 -0
- data/fastlane/lib/fastlane/actions/update_icloud_container_identifiers.rb +96 -0
- data/fastlane/lib/fastlane/actions/update_info_plist.rb +143 -0
- data/fastlane/lib/fastlane/actions/update_keychain_access_groups.rb +91 -0
- data/fastlane/lib/fastlane/actions/update_plist.rb +115 -0
- data/fastlane/lib/fastlane/actions/update_project_code_signing.rb +76 -0
- data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +181 -0
- data/fastlane/lib/fastlane/actions/update_project_team.rb +95 -0
- data/fastlane/lib/fastlane/actions/update_urban_airship_configuration.rb +90 -0
- data/fastlane/lib/fastlane/actions/update_url_schemes.rb +112 -0
- data/fastlane/lib/fastlane/actions/upload_app_privacy_details_to_app_store.rb +290 -0
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +232 -0
- data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +158 -0
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +71 -0
- data/fastlane/lib/fastlane/actions/upload_to_play_store.rb +80 -0
- data/fastlane/lib/fastlane/actions/upload_to_play_store_internal_app_sharing.rb +78 -0
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +126 -0
- data/fastlane/lib/fastlane/actions/validate_play_store_json_key.rb +100 -0
- data/fastlane/lib/fastlane/actions/verify_build.rb +199 -0
- data/fastlane/lib/fastlane/actions/verify_pod_keys.rb +67 -0
- data/fastlane/lib/fastlane/actions/verify_xcode.rb +159 -0
- data/fastlane/lib/fastlane/actions/version_bump_podspec.rb +105 -0
- data/fastlane/lib/fastlane/actions/version_get_podspec.rb +70 -0
- data/fastlane/lib/fastlane/actions/xcode_install.rb +112 -0
- data/fastlane/lib/fastlane/actions/xcode_select.rb +68 -0
- data/fastlane/lib/fastlane/actions/xcode_server_get_assets.rb +312 -0
- data/fastlane/lib/fastlane/actions/xcodebuild.rb +647 -0
- data/fastlane/lib/fastlane/actions/xcodes.rb +152 -0
- data/fastlane/lib/fastlane/actions/xcov.rb +71 -0
- data/fastlane/lib/fastlane/actions/xctool.rb +55 -0
- data/fastlane/lib/fastlane/actions/xcversion.rb +65 -0
- data/fastlane/lib/fastlane/actions/zip.rb +185 -0
- data/fastlane/lib/fastlane/auto_complete.rb +82 -0
- data/fastlane/lib/fastlane/boolean.rb +5 -0
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +215 -0
- data/fastlane/lib/fastlane/command_line_handler.rb +49 -0
- data/fastlane/lib/fastlane/commands_generator.rb +371 -0
- data/fastlane/lib/fastlane/configuration_helper.rb +26 -0
- data/fastlane/lib/fastlane/core_ext/bundler_monkey_patch.rb +14 -0
- data/fastlane/lib/fastlane/documentation/actions_list.rb +214 -0
- data/fastlane/lib/fastlane/documentation/docs_generator.rb +94 -0
- data/fastlane/lib/fastlane/documentation/markdown_docs_generator.rb +234 -0
- data/fastlane/lib/fastlane/environment_printer.rb +304 -0
- data/fastlane/lib/fastlane/erb_template_helper.rb +36 -0
- data/fastlane/lib/fastlane/fast_file.rb +464 -0
- data/fastlane/lib/fastlane/fastlane_require.rb +81 -0
- data/fastlane/lib/fastlane/features.rb +10 -0
- data/fastlane/lib/fastlane/helper/README.md +29 -0
- data/fastlane/lib/fastlane/helper/adb_helper.rb +66 -0
- data/fastlane/lib/fastlane/helper/dotenv_helper.rb +50 -0
- data/fastlane/lib/fastlane/helper/gem_helper.rb +26 -0
- data/fastlane/lib/fastlane/helper/git_helper.rb +166 -0
- data/fastlane/lib/fastlane/helper/gradle_helper.rb +62 -0
- data/fastlane/lib/fastlane/helper/lane_helper.rb +13 -0
- data/fastlane/lib/fastlane/helper/podspec_helper.rb +75 -0
- data/fastlane/lib/fastlane/helper/s3_client_helper.rb +78 -0
- data/fastlane/lib/fastlane/helper/sh_helper.rb +134 -0
- data/fastlane/lib/fastlane/helper/xcodebuild_formatter_helper.rb +9 -0
- data/fastlane/lib/fastlane/helper/xcodeproj_helper.rb +12 -0
- data/fastlane/lib/fastlane/helper/xcodes_helper.rb +28 -0
- data/fastlane/lib/fastlane/helper/xcversion_helper.rb +16 -0
- data/fastlane/lib/fastlane/junit_generator.rb +27 -0
- data/fastlane/lib/fastlane/lane.rb +97 -0
- data/fastlane/lib/fastlane/lane_list.rb +137 -0
- data/fastlane/lib/fastlane/lane_manager.rb +131 -0
- data/fastlane/lib/fastlane/lane_manager_base.rb +92 -0
- data/fastlane/lib/fastlane/markdown_table_formatter.rb +62 -0
- data/fastlane/lib/fastlane/new_action.rb +47 -0
- data/fastlane/lib/fastlane/notification/slack.rb +56 -0
- data/fastlane/lib/fastlane/one_off.rb +45 -0
- data/fastlane/lib/fastlane/other_action.rb +29 -0
- data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +54 -0
- data/fastlane/lib/fastlane/plugins/plugin_generator.rb +86 -0
- data/fastlane/lib/fastlane/plugins/plugin_generator_ui.rb +19 -0
- data/fastlane/lib/fastlane/plugins/plugin_info.rb +49 -0
- data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +158 -0
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +398 -0
- data/fastlane/lib/fastlane/plugins/plugin_search.rb +46 -0
- data/fastlane/lib/fastlane/plugins/plugin_update_manager.rb +70 -0
- data/fastlane/lib/fastlane/plugins/plugins.rb +12 -0
- data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +36 -0
- data/fastlane/lib/fastlane/plugins/template/.circleci/config.yml +43 -0
- data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +29 -0
- data/fastlane/lib/fastlane/plugins/template/.gitignore +12 -0
- data/fastlane/lib/fastlane/plugins/template/.rspec +5 -0
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +188 -0
- data/fastlane/lib/fastlane/plugins/template/.travis.yml +4 -0
- data/fastlane/lib/fastlane/plugins/template/Gemfile +6 -0
- data/fastlane/lib/fastlane/plugins/template/LICENSE.erb +21 -0
- data/fastlane/lib/fastlane/plugins/template/README.md.erb +52 -0
- data/fastlane/lib/fastlane/plugins/template/Rakefile +9 -0
- data/fastlane/lib/fastlane/plugins/template/fastlane/Fastfile.erb +3 -0
- data/fastlane/lib/fastlane/plugins/template/fastlane/Pluginfile.erb +1 -0
- data/fastlane/lib/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%/actions/%plugin_name%_action.rb.erb +47 -0
- data/fastlane/lib/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%/helper/%plugin_name%_helper.rb.erb +16 -0
- data/fastlane/lib/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%/version.rb.erb +5 -0
- data/fastlane/lib/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%.rb.erb +16 -0
- data/fastlane/lib/fastlane/plugins/template/spec/%plugin_name%_action_spec.rb.erb +9 -0
- data/fastlane/lib/fastlane/plugins/template/spec/spec_helper.rb.erb +15 -0
- data/fastlane/lib/fastlane/runner.rb +378 -0
- data/fastlane/lib/fastlane/server/action_command.rb +61 -0
- data/fastlane/lib/fastlane/server/action_command_return.rb +14 -0
- data/fastlane/lib/fastlane/server/command_executor.rb +7 -0
- data/fastlane/lib/fastlane/server/command_parser.rb +44 -0
- data/fastlane/lib/fastlane/server/control_command.rb +23 -0
- data/fastlane/lib/fastlane/server/json_return_value_processor.rb +72 -0
- data/fastlane/lib/fastlane/server/socket_server.rb +238 -0
- data/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb +101 -0
- data/fastlane/lib/fastlane/setup/setup.rb +368 -0
- data/fastlane/lib/fastlane/setup/setup_android.rb +97 -0
- data/fastlane/lib/fastlane/setup/setup_ios.rb +504 -0
- data/fastlane/lib/fastlane/shells.rb +6 -0
- data/fastlane/lib/fastlane/supported_platforms.rb +28 -0
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +480 -0
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +447 -0
- data/fastlane/lib/fastlane/swift_lane_manager.rb +304 -0
- data/fastlane/lib/fastlane/swift_runner_upgrader.rb +265 -0
- data/fastlane/lib/fastlane/tools.rb +50 -0
- data/fastlane/lib/fastlane/version.rb +6 -0
- data/fastlane/lib/fastlane.rb +53 -0
- data/fastlane/swift/Actions.swift +16 -0
- data/fastlane/swift/Appfile.swift +15 -0
- data/fastlane/swift/ArgumentProcessor.swift +89 -0
- data/fastlane/swift/Atomic.swift +150 -0
- data/fastlane/swift/ControlCommand.swift +74 -0
- data/fastlane/swift/Deliverfile.swift +20 -0
- data/fastlane/swift/DeliverfileProtocol.swift +267 -0
- data/fastlane/swift/Fastfile.swift +16 -0
- data/fastlane/swift/Fastlane.swift +13576 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +448 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +97 -0
- data/fastlane/swift/FastlaneSwiftRunner/README.txt +10 -0
- data/fastlane/swift/Gymfile.swift +20 -0
- data/fastlane/swift/GymfileProtocol.swift +211 -0
- data/fastlane/swift/LaneFileProtocol.swift +155 -0
- data/fastlane/swift/MainProcess.swift +79 -0
- data/fastlane/swift/Matchfile.swift +20 -0
- data/fastlane/swift/MatchfileProtocol.swift +211 -0
- data/fastlane/swift/OptionalConfigValue.swift +101 -0
- data/fastlane/swift/Plugins.swift +16 -0
- data/fastlane/swift/Precheckfile.swift +20 -0
- data/fastlane/swift/PrecheckfileProtocol.swift +55 -0
- data/fastlane/swift/RubyCommand.swift +157 -0
- data/fastlane/swift/RubyCommandable.swift +43 -0
- data/fastlane/swift/Runner.swift +279 -0
- data/fastlane/swift/RunnerArgument.swift +20 -0
- data/fastlane/swift/Scanfile.swift +20 -0
- data/fastlane/swift/ScanfileProtocol.swift +319 -0
- data/fastlane/swift/Screengrabfile.swift +20 -0
- data/fastlane/swift/ScreengrabfileProtocol.swift +99 -0
- data/fastlane/swift/Snapshotfile.swift +20 -0
- data/fastlane/swift/SnapshotfileProtocol.swift +207 -0
- data/fastlane/swift/SocketClient.swift +332 -0
- data/fastlane/swift/SocketClientDelegateProtocol.swift +21 -0
- data/fastlane/swift/SocketResponse.swift +84 -0
- data/fastlane/swift/formatting/Brewfile +1 -0
- data/fastlane/swift/formatting/Brewfile.lock.json +86 -0
- data/fastlane/swift/formatting/Rakefile +18 -0
- data/fastlane/swift/main.swift +47 -0
- data/fastlane/swift/upgrade_manifest.json +1 -0
- data/fastlane_core/README.md +80 -0
- data/fastlane_core/lib/assets/XMLTemplate.xml.erb +12 -0
- data/fastlane_core/lib/fastlane_core/analytics/action_completion_context.rb +34 -0
- data/fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb +38 -0
- data/fastlane_core/lib/fastlane_core/analytics/analytics_event_builder.rb +23 -0
- data/fastlane_core/lib/fastlane_core/analytics/analytics_ingester_client.rb +54 -0
- data/fastlane_core/lib/fastlane_core/analytics/analytics_session.rb +70 -0
- data/fastlane_core/lib/fastlane_core/analytics/app_identifier_guesser.rb +64 -0
- data/fastlane_core/lib/fastlane_core/android_package_name_guesser.rb +79 -0
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +192 -0
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +211 -0
- data/fastlane_core/lib/fastlane_core/clipboard.rb +20 -0
- data/fastlane_core/lib/fastlane_core/command_executor.rb +94 -0
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +108 -0
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +359 -0
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +338 -0
- data/fastlane_core/lib/fastlane_core/configuration/configuration_file.rb +182 -0
- data/fastlane_core/lib/fastlane_core/core_ext/cfpropertylist.rb +23 -0
- data/fastlane_core/lib/fastlane_core/core_ext/shellwords.rb +63 -0
- data/fastlane_core/lib/fastlane_core/core_ext/string.rb +17 -0
- data/fastlane_core/lib/fastlane_core/device_manager.rb +378 -0
- data/fastlane_core/lib/fastlane_core/env.rb +9 -0
- data/fastlane_core/lib/fastlane_core/fastlane_folder.rb +72 -0
- data/fastlane_core/lib/fastlane_core/fastlane_pty.rb +57 -0
- data/fastlane_core/lib/fastlane_core/feature/feature.rb +51 -0
- data/fastlane_core/lib/fastlane_core/features.rb +4 -0
- data/fastlane_core/lib/fastlane_core/globals.rb +27 -0
- data/fastlane_core/lib/fastlane_core/helper.rb +501 -0
- data/fastlane_core/lib/fastlane_core/ios_app_identifier_guesser.rb +112 -0
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +93 -0
- data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +53 -0
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +983 -0
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +128 -0
- data/fastlane_core/lib/fastlane_core/languages.rb +16 -0
- data/fastlane_core/lib/fastlane_core/module.rb +31 -0
- data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +56 -0
- data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +49 -0
- data/fastlane_core/lib/fastlane_core/print_table.rb +133 -0
- data/fastlane_core/lib/fastlane_core/project.rb +546 -0
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +126 -0
- data/fastlane_core/lib/fastlane_core/queue_worker.rb +49 -0
- data/fastlane_core/lib/fastlane_core/string_filters.rb +51 -0
- data/fastlane_core/lib/fastlane_core/swag.rb +85 -0
- data/fastlane_core/lib/fastlane_core/tag_version.rb +31 -0
- data/fastlane_core/lib/fastlane_core/test_parser.rb +107 -0
- data/fastlane_core/lib/fastlane_core/ui/disable_colors.rb +26 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_common_error.rb +19 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_crash.rb +11 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_error.rb +25 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_exception.rb +19 -0
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_shell_error.rb +11 -0
- data/fastlane_core/lib/fastlane_core/ui/errors.rb +1 -0
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +342 -0
- data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +62 -0
- data/fastlane_core/lib/fastlane_core/ui/help.erb +35 -0
- data/fastlane_core/lib/fastlane_core/ui/help_formatter.rb +16 -0
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +175 -0
- data/fastlane_core/lib/fastlane_core/ui/interface.rb +205 -0
- data/fastlane_core/lib/fastlane_core/ui/ui.rb +26 -0
- data/fastlane_core/lib/fastlane_core/update_checker/changelog.rb +37 -0
- data/fastlane_core/lib/fastlane_core/update_checker/update_checker.rb +109 -0
- data/fastlane_core/lib/fastlane_core.rb +48 -0
- data/frameit/README.md +17 -0
- data/frameit/lib/assets/empty.png +0 -0
- data/frameit/lib/frameit/commands_generator.rb +141 -0
- data/frameit/lib/frameit/config_parser.rb +136 -0
- data/frameit/lib/frameit/dependency_checker.rb +22 -0
- data/frameit/lib/frameit/device.rb +90 -0
- data/frameit/lib/frameit/device_types.rb +159 -0
- data/frameit/lib/frameit/editor.rb +558 -0
- data/frameit/lib/frameit/frame_downloader.rb +86 -0
- data/frameit/lib/frameit/mac_editor.rb +35 -0
- data/frameit/lib/frameit/module.rb +42 -0
- data/frameit/lib/frameit/offsets.rb +28 -0
- data/frameit/lib/frameit/options.rb +112 -0
- data/frameit/lib/frameit/runner.rb +97 -0
- data/frameit/lib/frameit/screenshot.rb +134 -0
- data/frameit/lib/frameit/strings_parser.rb +46 -0
- data/frameit/lib/frameit/template_finder.rb +45 -0
- data/frameit/lib/frameit/trim_box.rb +41 -0
- data/frameit/lib/frameit.rb +13 -0
- data/gym/README.md +17 -0
- data/gym/lib/assets/GymfileTemplate +13 -0
- data/gym/lib/assets/GymfileTemplate.swift +13 -0
- data/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh +61 -0
- data/gym/lib/gym/code_signing_mapping.rb +210 -0
- data/gym/lib/gym/commands_generator.rb +79 -0
- data/gym/lib/gym/detect_values.rb +206 -0
- data/gym/lib/gym/error_handler.rb +314 -0
- data/gym/lib/gym/generators/README.md +1 -0
- data/gym/lib/gym/generators/build_command_generator.rb +197 -0
- data/gym/lib/gym/generators/package_command_generator.rb +72 -0
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +238 -0
- data/gym/lib/gym/manager.rb +22 -0
- data/gym/lib/gym/module.rb +74 -0
- data/gym/lib/gym/options.rb +327 -0
- data/gym/lib/gym/runner.rb +376 -0
- data/gym/lib/gym/xcode.rb +27 -0
- data/gym/lib/gym/xcodebuild_fixes/README.md +9 -0
- data/gym/lib/gym/xcodebuild_fixes/generic_archive_fix.rb +35 -0
- data/gym/lib/gym.rb +9 -0
- data/match/README.md +17 -0
- data/match/lib/assets/MatchfileTemplate +11 -0
- data/match/lib/assets/MatchfileTemplate.swift +9 -0
- data/match/lib/assets/READMETemplate.md +59 -0
- data/match/lib/match/change_password.rb +55 -0
- data/match/lib/match/commands_generator.rb +192 -0
- data/match/lib/match/encryption/interface.rb +17 -0
- data/match/lib/match/encryption/openssl.rb +163 -0
- data/match/lib/match/encryption.rb +52 -0
- data/match/lib/match/generator.rb +124 -0
- data/match/lib/match/importer.rb +165 -0
- data/match/lib/match/migrate.rb +109 -0
- data/match/lib/match/module.rb +85 -0
- data/match/lib/match/nuke.rb +421 -0
- data/match/lib/match/options.rb +347 -0
- data/match/lib/match/runner.rb +472 -0
- data/match/lib/match/setup.rb +40 -0
- data/match/lib/match/spaceship_ensure.rb +103 -0
- data/match/lib/match/storage/git_storage.rb +254 -0
- data/match/lib/match/storage/gitlab/client.rb +102 -0
- data/match/lib/match/storage/gitlab/secure_file.rb +65 -0
- data/match/lib/match/storage/gitlab_secure_files.rb +182 -0
- data/match/lib/match/storage/google_cloud_storage.rb +383 -0
- data/match/lib/match/storage/interface.rb +119 -0
- data/match/lib/match/storage/s3_storage.rb +205 -0
- data/match/lib/match/storage.rb +50 -0
- data/match/lib/match/table_printer.rb +52 -0
- data/match/lib/match/utils.rb +88 -0
- data/match/lib/match.rb +14 -0
- data/pem/README.md +17 -0
- data/pem/lib/pem/commands_generator.rb +48 -0
- data/pem/lib/pem/manager.rb +136 -0
- data/pem/lib/pem/module.rb +19 -0
- data/pem/lib/pem/options.rb +112 -0
- data/pem/lib/pem.rb +4 -0
- data/pilot/README.md +17 -0
- data/pilot/lib/pilot/build_manager.rb +602 -0
- data/pilot/lib/pilot/commands_generator.rb +175 -0
- data/pilot/lib/pilot/manager.rb +95 -0
- data/pilot/lib/pilot/module.rb +11 -0
- data/pilot/lib/pilot/options.rb +336 -0
- data/pilot/lib/pilot/tester_exporter.rb +57 -0
- data/pilot/lib/pilot/tester_importer.rb +53 -0
- data/pilot/lib/pilot/tester_manager.rb +167 -0
- data/pilot/lib/pilot.rb +8 -0
- data/precheck/README.md +17 -0
- data/precheck/lib/assets/PrecheckfileTemplate +27 -0
- data/precheck/lib/assets/PrecheckfileTemplate.swift +19 -0
- data/precheck/lib/precheck/commands_generator.rb +75 -0
- data/precheck/lib/precheck/item_to_check.rb +58 -0
- data/precheck/lib/precheck/module.rb +23 -0
- data/precheck/lib/precheck/options.rb +110 -0
- data/precheck/lib/precheck/rule.rb +171 -0
- data/precheck/lib/precheck/rule_check_result.rb +19 -0
- data/precheck/lib/precheck/rule_processor.rb +265 -0
- data/precheck/lib/precheck/rules/abstract_text_match_rule.rb +80 -0
- data/precheck/lib/precheck/rules/all.rb +1 -0
- data/precheck/lib/precheck/rules/copyright_date_rule.rb +37 -0
- data/precheck/lib/precheck/rules/curse_words_rule.rb +62 -0
- data/precheck/lib/precheck/rules/custom_text_rule.rb +35 -0
- data/precheck/lib/precheck/rules/free_stuff_iap_rule.rb +31 -0
- data/precheck/lib/precheck/rules/future_functionality_rule.rb +33 -0
- data/precheck/lib/precheck/rules/negative_apple_sentiment_rule.rb +37 -0
- data/precheck/lib/precheck/rules/other_platforms_rule.rb +43 -0
- data/precheck/lib/precheck/rules/placeholder_words_rule.rb +31 -0
- data/precheck/lib/precheck/rules/rules_data/curse_word_hashes/en_us.txt +349 -0
- data/precheck/lib/precheck/rules/test_words_rule.rb +30 -0
- data/precheck/lib/precheck/rules/unreachable_urls_rule.rb +47 -0
- data/precheck/lib/precheck/runner.rb +202 -0
- data/precheck/lib/precheck.rb +3 -0
- data/produce/README.md +17 -0
- data/produce/lib/produce/available_default_languages.rb +51 -0
- data/produce/lib/produce/cloud_container.rb +82 -0
- data/produce/lib/produce/commands_generator.rb +337 -0
- data/produce/lib/produce/developer_center.rb +181 -0
- data/produce/lib/produce/group.rb +90 -0
- data/produce/lib/produce/itunes_connect.rb +139 -0
- data/produce/lib/produce/manager.rb +15 -0
- data/produce/lib/produce/merchant.rb +121 -0
- data/produce/lib/produce/module.rb +14 -0
- data/produce/lib/produce/options.rb +184 -0
- data/produce/lib/produce/service.rb +425 -0
- data/produce/lib/produce.rb +6 -0
- data/scan/README.md +17 -0
- data/scan/lib/assets/ScanfileTemplate +16 -0
- data/scan/lib/assets/ScanfileTemplate.swift +13 -0
- data/scan/lib/scan/commands_generator.rb +79 -0
- data/scan/lib/scan/detect_values.rb +244 -0
- data/scan/lib/scan/error_handler.rb +66 -0
- data/scan/lib/scan/manager.rb +38 -0
- data/scan/lib/scan/module.rb +37 -0
- data/scan/lib/scan/options.rb +541 -0
- data/scan/lib/scan/runner.rb +428 -0
- data/scan/lib/scan/slack_poster.rb +63 -0
- data/scan/lib/scan/test_command_generator.rb +262 -0
- data/scan/lib/scan/test_result_parser.rb +33 -0
- data/scan/lib/scan/xcpretty_reporter_options_generator.rb +85 -0
- data/scan/lib/scan.rb +10 -0
- data/screengrab/README.md +17 -0
- data/screengrab/lib/assets/ScreengrabfileTemplate +15 -0
- data/screengrab/lib/assets/ScreengrabfileTemplate.swift +15 -0
- data/screengrab/lib/screengrab/android_environment.rb +43 -0
- data/screengrab/lib/screengrab/commands_generator.rb +71 -0
- data/screengrab/lib/screengrab/dependency_checker.rb +38 -0
- data/screengrab/lib/screengrab/detect_values.rb +16 -0
- data/screengrab/lib/screengrab/module.rb +26 -0
- data/screengrab/lib/screengrab/options.rb +151 -0
- data/screengrab/lib/screengrab/page.html.erb +190 -0
- data/screengrab/lib/screengrab/reports_generator.rb +36 -0
- data/screengrab/lib/screengrab/runner.rb +452 -0
- data/screengrab/lib/screengrab/setup.rb +24 -0
- data/screengrab/lib/screengrab.rb +7 -0
- data/sigh/README.md +17 -0
- data/sigh/lib/assets/resign.sh +932 -0
- data/sigh/lib/sigh/commands_generator.rb +155 -0
- data/sigh/lib/sigh/download_all.rb +120 -0
- data/sigh/lib/sigh/local_manage.rb +145 -0
- data/sigh/lib/sigh/manager.rb +47 -0
- data/sigh/lib/sigh/module.rb +44 -0
- data/sigh/lib/sigh/options.rb +199 -0
- data/sigh/lib/sigh/repair.rb +34 -0
- data/sigh/lib/sigh/resign.rb +220 -0
- data/sigh/lib/sigh/runner.rb +412 -0
- data/sigh/lib/sigh.rb +4 -0
- data/snapshot/README.md +17 -0
- data/snapshot/lib/assets/SnapfileTemplate +38 -0
- data/snapshot/lib/assets/SnapfileTemplate.swift +42 -0
- data/snapshot/lib/assets/SnapshotHelper.swift +309 -0
- data/snapshot/lib/assets/SnapshotHelperXcode8.swift +172 -0
- data/snapshot/lib/snapshot/collector.rb +140 -0
- data/snapshot/lib/snapshot/commands_generator.rb +117 -0
- data/snapshot/lib/snapshot/dependency_checker.rb +69 -0
- data/snapshot/lib/snapshot/detect_values.rb +86 -0
- data/snapshot/lib/snapshot/error_handler.rb +24 -0
- data/snapshot/lib/snapshot/fixes/README.md +5 -0
- data/snapshot/lib/snapshot/fixes/hardware_keyboard_fix.rb +27 -0
- data/snapshot/lib/snapshot/fixes/simulator_shared_pasteboard.rb +16 -0
- data/snapshot/lib/snapshot/fixes/simulator_zoom_fix.rb +27 -0
- data/snapshot/lib/snapshot/latest_os_version.rb +34 -0
- data/snapshot/lib/snapshot/module.rb +44 -0
- data/snapshot/lib/snapshot/options.rb +326 -0
- data/snapshot/lib/snapshot/page.html.erb +285 -0
- data/snapshot/lib/snapshot/reports_generator.rb +154 -0
- data/snapshot/lib/snapshot/reset_simulators.rb +122 -0
- data/snapshot/lib/snapshot/runner.rb +146 -0
- data/snapshot/lib/snapshot/screenshot_flatten.rb +20 -0
- data/snapshot/lib/snapshot/screenshot_rotate.rb +36 -0
- data/snapshot/lib/snapshot/setup.rb +58 -0
- data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +64 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +219 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +220 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_xcode_8.rb +113 -0
- data/snapshot/lib/snapshot/test_command_generator.rb +157 -0
- data/snapshot/lib/snapshot/test_command_generator_base.rb +130 -0
- data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +70 -0
- data/snapshot/lib/snapshot/update.rb +38 -0
- data/snapshot/lib/snapshot.rb +19 -0
- data/spaceship/README.md +173 -0
- data/spaceship/lib/assets/displayFamilies.json +181 -0
- data/spaceship/lib/assets/languageMapping.json +306 -0
- data/spaceship/lib/assets/languageMappingReadable.json +30 -0
- data/spaceship/lib/spaceship/base.rb +310 -0
- data/spaceship/lib/spaceship/client.rb +988 -0
- data/spaceship/lib/spaceship/commands_generator.rb +55 -0
- data/spaceship/lib/spaceship/connect_api/api_client.rb +356 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +216 -0
- data/spaceship/lib/spaceship/connect_api/file_uploader.rb +99 -0
- data/spaceship/lib/spaceship/connect_api/model.rb +172 -0
- data/spaceship/lib/spaceship/connect_api/models/actor.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +147 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +482 -0
- data/spaceship/lib/spaceship/connect_api/models/app_category.rb +94 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage.rb +59 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_category.rb +65 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_data_protection.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_grouping.rb +18 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usage_purposes.rb +37 -0
- data/spaceship/lib/spaceship/connect_api/models/app_data_usages_publish_state.rb +36 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +112 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +48 -0
- data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +135 -0
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +109 -0
- data/spaceship/lib/spaceship/connect_api/models/app_price.rb +22 -0
- data/spaceship/lib/spaceship/connect_api/models/app_price_point.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/app_price_tier.rb +12 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +189 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +169 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_attachment.rb +73 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +53 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +241 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +115 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_phased_release.rb +57 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_release_request.rb +12 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_submission.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_app_localization.rb +28 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_app_review_detail.rb +32 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_app_review_submission.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_build_localization.rb +20 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_build_metric.rb +24 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_feedback.rb +77 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +67 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_screenshot.rb +18 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +63 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_tester_metric.rb +44 -0
- data/spaceship/lib/spaceship/connect_api/models/build.rb +195 -0
- data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +69 -0
- data/spaceship/lib/spaceship/connect_api/models/build_bundle.rb +68 -0
- data/spaceship/lib/spaceship/connect_api/models/build_bundle_file_sizes.rb +34 -0
- data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +38 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +93 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +136 -0
- data/spaceship/lib/spaceship/connect_api/models/capabilities.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +110 -0
- data/spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb +43 -0
- data/spaceship/lib/spaceship/connect_api/models/custom_app_user.rb +41 -0
- data/spaceship/lib/spaceship/connect_api/models/device.rb +133 -0
- data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +43 -0
- data/spaceship/lib/spaceship/connect_api/models/pre_release_version.rb +20 -0
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +111 -0
- data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/resolution_center_message.rb +29 -0
- data/spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb +67 -0
- data/spaceship/lib/spaceship/connect_api/models/review_rejection.rb +19 -0
- data/spaceship/lib/spaceship/connect_api/models/review_submission.rb +86 -0
- data/spaceship/lib/spaceship/connect_api/models/review_submission_item.rb +40 -0
- data/spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb +67 -0
- data/spaceship/lib/spaceship/connect_api/models/territory.rb +28 -0
- data/spaceship/lib/spaceship/connect_api/models/user.rb +72 -0
- data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +96 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/client.rb +92 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +264 -0
- data/spaceship/lib/spaceship/connect_api/response.rb +86 -0
- data/spaceship/lib/spaceship/connect_api/spaceship.rb +102 -0
- data/spaceship/lib/spaceship/connect_api/testflight/client.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +513 -0
- data/spaceship/lib/spaceship/connect_api/token.rb +120 -0
- data/spaceship/lib/spaceship/connect_api/token_refresh_middleware.rb +24 -0
- data/spaceship/lib/spaceship/connect_api/tunes/client.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +1281 -0
- data/spaceship/lib/spaceship/connect_api/users/client.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/users/users.rb +135 -0
- data/spaceship/lib/spaceship/connect_api.rb +132 -0
- data/spaceship/lib/spaceship/du/du_client.rb +138 -0
- data/spaceship/lib/spaceship/du/upload_file.rb +58 -0
- data/spaceship/lib/spaceship/du/utilities.rb +99 -0
- data/spaceship/lib/spaceship/errors.rb +135 -0
- data/spaceship/lib/spaceship/globals.rb +21 -0
- data/spaceship/lib/spaceship/hashcash.rb +52 -0
- data/spaceship/lib/spaceship/helper/net_http_generic_request.rb +20 -0
- data/spaceship/lib/spaceship/helper/plist_middleware.rb +16 -0
- data/spaceship/lib/spaceship/helper/rels_middleware.rb +28 -0
- data/spaceship/lib/spaceship/launcher.rb +99 -0
- data/spaceship/lib/spaceship/module.rb +8 -0
- data/spaceship/lib/spaceship/playground.rb +75 -0
- data/spaceship/lib/spaceship/portal/app.rb +201 -0
- data/spaceship/lib/spaceship/portal/app_group.rb +73 -0
- data/spaceship/lib/spaceship/portal/app_service.rb +87 -0
- data/spaceship/lib/spaceship/portal/certificate.rb +366 -0
- data/spaceship/lib/spaceship/portal/cloud_container.rb +74 -0
- data/spaceship/lib/spaceship/portal/device.rb +191 -0
- data/spaceship/lib/spaceship/portal/invite.rb +53 -0
- data/spaceship/lib/spaceship/portal/key.rb +101 -0
- data/spaceship/lib/spaceship/portal/legacy_wrapper.rb +21 -0
- data/spaceship/lib/spaceship/portal/merchant.rb +86 -0
- data/spaceship/lib/spaceship/portal/passbook.rb +78 -0
- data/spaceship/lib/spaceship/portal/person.rb +62 -0
- data/spaceship/lib/spaceship/portal/persons.rb +67 -0
- data/spaceship/lib/spaceship/portal/portal.rb +17 -0
- data/spaceship/lib/spaceship/portal/portal_base.rb +16 -0
- data/spaceship/lib/spaceship/portal/portal_client.rb +862 -0
- data/spaceship/lib/spaceship/portal/provisioning_profile.rb +559 -0
- data/spaceship/lib/spaceship/portal/provisioning_profile_template.rb +52 -0
- data/spaceship/lib/spaceship/portal/spaceship.rb +154 -0
- data/spaceship/lib/spaceship/portal/ui/select_team.rb +116 -0
- data/spaceship/lib/spaceship/portal/website_push.rb +88 -0
- data/spaceship/lib/spaceship/provider.rb +13 -0
- data/spaceship/lib/spaceship/spaceauth_runner.rb +97 -0
- data/spaceship/lib/spaceship/stats_middleware.rb +65 -0
- data/spaceship/lib/spaceship/test_flight/app_test_info.rb +40 -0
- data/spaceship/lib/spaceship/test_flight/base.rb +39 -0
- data/spaceship/lib/spaceship/test_flight/beta_review_info.rb +19 -0
- data/spaceship/lib/spaceship/test_flight/build.rb +242 -0
- data/spaceship/lib/spaceship/test_flight/build_trains.rb +50 -0
- data/spaceship/lib/spaceship/test_flight/client.rb +361 -0
- data/spaceship/lib/spaceship/test_flight/export_compliance.rb +12 -0
- data/spaceship/lib/spaceship/test_flight/group.rb +131 -0
- data/spaceship/lib/spaceship/test_flight/test_info.rb +56 -0
- data/spaceship/lib/spaceship/test_flight/tester.rb +136 -0
- data/spaceship/lib/spaceship/test_flight.rb +10 -0
- data/spaceship/lib/spaceship/tunes/app_analytics.rb +168 -0
- data/spaceship/lib/spaceship/tunes/app_details.rb +147 -0
- data/spaceship/lib/spaceship/tunes/app_image.rb +51 -0
- data/spaceship/lib/spaceship/tunes/app_ratings.rb +58 -0
- data/spaceship/lib/spaceship/tunes/app_review.rb +55 -0
- data/spaceship/lib/spaceship/tunes/app_review_attachment.rb +49 -0
- data/spaceship/lib/spaceship/tunes/app_screenshot.rb +12 -0
- data/spaceship/lib/spaceship/tunes/app_status.rb +63 -0
- data/spaceship/lib/spaceship/tunes/app_submission.rb +161 -0
- data/spaceship/lib/spaceship/tunes/app_trailer.rb +64 -0
- data/spaceship/lib/spaceship/tunes/app_version.rb +970 -0
- data/spaceship/lib/spaceship/tunes/app_version_common.rb +35 -0
- data/spaceship/lib/spaceship/tunes/app_version_generated_promocodes.rb +28 -0
- data/spaceship/lib/spaceship/tunes/app_version_history.rb +52 -0
- data/spaceship/lib/spaceship/tunes/app_version_promocodes.rb +27 -0
- data/spaceship/lib/spaceship/tunes/app_version_ref.rb +15 -0
- data/spaceship/lib/spaceship/tunes/app_version_states_history.rb +27 -0
- data/spaceship/lib/spaceship/tunes/application.rb +453 -0
- data/spaceship/lib/spaceship/tunes/availability.rb +164 -0
- data/spaceship/lib/spaceship/tunes/b2b_organization.rb +50 -0
- data/spaceship/lib/spaceship/tunes/b2b_user.rb +30 -0
- data/spaceship/lib/spaceship/tunes/build.rb +263 -0
- data/spaceship/lib/spaceship/tunes/build_details.rb +184 -0
- data/spaceship/lib/spaceship/tunes/build_train.rb +181 -0
- data/spaceship/lib/spaceship/tunes/developer_response.rb +23 -0
- data/spaceship/lib/spaceship/tunes/device_type.rb +17 -0
- data/spaceship/lib/spaceship/tunes/display_family.rb +84 -0
- data/spaceship/lib/spaceship/tunes/errors.rb +17 -0
- data/spaceship/lib/spaceship/tunes/iap.rb +168 -0
- data/spaceship/lib/spaceship/tunes/iap_detail.rb +264 -0
- data/spaceship/lib/spaceship/tunes/iap_families.rb +68 -0
- data/spaceship/lib/spaceship/tunes/iap_family_details.rb +90 -0
- data/spaceship/lib/spaceship/tunes/iap_family_list.rb +28 -0
- data/spaceship/lib/spaceship/tunes/iap_list.rb +76 -0
- data/spaceship/lib/spaceship/tunes/iap_status.rb +56 -0
- data/spaceship/lib/spaceship/tunes/iap_subscription_pricing_info.rb +46 -0
- data/spaceship/lib/spaceship/tunes/iap_subscription_pricing_tier.rb +25 -0
- data/spaceship/lib/spaceship/tunes/iap_type.rb +45 -0
- data/spaceship/lib/spaceship/tunes/language_converter.rb +65 -0
- data/spaceship/lib/spaceship/tunes/language_item.rb +61 -0
- data/spaceship/lib/spaceship/tunes/legacy_wrapper.rb +13 -0
- data/spaceship/lib/spaceship/tunes/member.rb +84 -0
- data/spaceship/lib/spaceship/tunes/members.rb +35 -0
- data/spaceship/lib/spaceship/tunes/pricing_info.rb +42 -0
- data/spaceship/lib/spaceship/tunes/pricing_tier.rb +25 -0
- data/spaceship/lib/spaceship/tunes/sandbox_tester.rb +74 -0
- data/spaceship/lib/spaceship/tunes/spaceship.rb +39 -0
- data/spaceship/lib/spaceship/tunes/territory.rb +39 -0
- data/spaceship/lib/spaceship/tunes/transit_app_file.rb +23 -0
- data/spaceship/lib/spaceship/tunes/tunes.rb +34 -0
- data/spaceship/lib/spaceship/tunes/tunes_base.rb +17 -0
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +1705 -0
- data/spaceship/lib/spaceship/tunes/version_set.rb +26 -0
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +380 -0
- data/spaceship/lib/spaceship/ui.rb +27 -0
- data/spaceship/lib/spaceship/upgrade_2fa_later_client.rb +91 -0
- data/spaceship/lib/spaceship.rb +31 -0
- data/supply/README.md +17 -0
- data/supply/lib/supply/apk_listing.rb +14 -0
- data/supply/lib/supply/client.rb +587 -0
- data/supply/lib/supply/commands_generator.rb +68 -0
- data/supply/lib/supply/languages.rb +88 -0
- data/supply/lib/supply/listing.rb +32 -0
- data/supply/lib/supply/options.rb +344 -0
- data/supply/lib/supply/reader.rb +41 -0
- data/supply/lib/supply/release_listing.rb +18 -0
- data/supply/lib/supply/setup.rb +122 -0
- data/supply/lib/supply/uploader.rb +489 -0
- data/supply/lib/supply.rb +53 -0
- data/trainer/lib/assets/junit.xml.erb +28 -0
- data/trainer/lib/trainer/commands_generator.rb +51 -0
- data/trainer/lib/trainer/junit_generator.rb +31 -0
- data/trainer/lib/trainer/module.rb +10 -0
- data/trainer/lib/trainer/options.rb +66 -0
- data/trainer/lib/trainer/test_parser.rb +398 -0
- data/trainer/lib/trainer/xcresult.rb +403 -0
- data/trainer/lib/trainer.rb +7 -0
- metadata +1909 -0
@@ -0,0 +1,192 @@
|
|
1
|
+
require 'spaceship/connect_api'
|
2
|
+
|
3
|
+
require_relative 'ui/ui'
|
4
|
+
|
5
|
+
module FastlaneCore
|
6
|
+
class BuildWatcherError < StandardError
|
7
|
+
end
|
8
|
+
|
9
|
+
class BuildWatcher
|
10
|
+
VersionMatches = Struct.new(:version, :builds)
|
11
|
+
|
12
|
+
class << self
|
13
|
+
# @return The build we waited for. This method will always return a build
|
14
|
+
def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, timeout_duration: nil, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true, select_latest: false, wait_for_build_beta_detail_processing: false)
|
15
|
+
# Warn about train_version being removed in the future
|
16
|
+
if train_version
|
17
|
+
UI.deprecated(":train_version is no longer a used argument on FastlaneCore::BuildWatcher. Please use :app_version instead.")
|
18
|
+
app_version = train_version
|
19
|
+
end
|
20
|
+
|
21
|
+
# Warn about strict_build_watch being removed in the future
|
22
|
+
if strict_build_watch
|
23
|
+
UI.deprecated(":strict_build_watch is no longer a used argument on FastlaneCore::BuildWatcher.")
|
24
|
+
end
|
25
|
+
|
26
|
+
platform = Spaceship::ConnectAPI::Platform.map(platform) if platform
|
27
|
+
UI.message("Waiting for processing on... app_id: #{app_id}, app_version: #{app_version}, build_version: #{build_version}, platform: #{platform}")
|
28
|
+
|
29
|
+
build_watching_start_time = Time.new
|
30
|
+
unless timeout_duration.nil?
|
31
|
+
end_time = build_watching_start_time + timeout_duration
|
32
|
+
UI.message("Will timeout watching build after #{timeout_duration} seconds around #{end_time}...")
|
33
|
+
end
|
34
|
+
|
35
|
+
showed_info = false
|
36
|
+
loop do
|
37
|
+
matched_build, app_version_queried = matching_build(watched_app_version: app_version, watched_build_version: build_version, app_id: app_id, platform: platform, select_latest: select_latest)
|
38
|
+
|
39
|
+
if matched_build.nil? && !showed_info
|
40
|
+
UI.important("Read more information on why this build isn't showing up yet - https://github.com/fastlane/fastlane/issues/14997")
|
41
|
+
showed_info = true
|
42
|
+
end
|
43
|
+
|
44
|
+
report_status(build: matched_build, wait_for_build_beta_detail_processing: wait_for_build_beta_detail_processing)
|
45
|
+
|
46
|
+
# Processing of builds by AppStoreConnect can be a very time consuming task and will
|
47
|
+
# block the worker running this task until it is completed. In some cases,
|
48
|
+
# having a build resource appear in AppStoreConnect (matched_build) may be enough (i.e. setting a changelog)
|
49
|
+
# so here we may choose to skip the full processing of the build if return_when_build_appears is true
|
50
|
+
if matched_build && (return_when_build_appears || processed?(build: matched_build, wait_for_build_beta_detail_processing: wait_for_build_beta_detail_processing))
|
51
|
+
|
52
|
+
if !app_version.nil? && app_version != app_version_queried
|
53
|
+
UI.important("App version is #{app_version} but build was found while querying #{app_version_queried}")
|
54
|
+
UI.important("This shouldn't be an issue as Apple sees #{app_version} and #{app_version_queried} as equal")
|
55
|
+
UI.important("See docs for more info - https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102364")
|
56
|
+
end
|
57
|
+
|
58
|
+
if return_spaceship_testflight_build
|
59
|
+
return matched_build.to_testflight_build
|
60
|
+
else
|
61
|
+
return matched_build
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Before next poll, force stop build watching, if we exceeded the 'timeout_duration' waiting time
|
66
|
+
force_stop_build_watching_if_required(start_time: build_watching_start_time, timeout_duration: timeout_duration)
|
67
|
+
|
68
|
+
sleep(poll_interval)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
private
|
73
|
+
|
74
|
+
# Remove leading zeros ( https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102364 )
|
75
|
+
def remove_version_leading_zeros(version: nil)
|
76
|
+
return version.instance_of?(String) ? version.split('.').map { |s| s.to_i.to_s }.join('.') : version
|
77
|
+
end
|
78
|
+
|
79
|
+
def matching_build(watched_app_version: nil, watched_build_version: nil, app_id: nil, platform: nil, select_latest: false)
|
80
|
+
# Get build deliveries (newly uploaded processing builds)
|
81
|
+
watched_app_version = remove_version_leading_zeros(version: watched_app_version)
|
82
|
+
watched_build_version = remove_version_leading_zeros(version: watched_build_version)
|
83
|
+
|
84
|
+
# App Store Connect will allow users to upload X.Y is the same as X.Y.0 and treat them as the same version
|
85
|
+
# However, only the first uploaded version format will be the one that is queryable
|
86
|
+
# This could lead to BuildWatcher never finding X.Y.0 if X.Y was upoaded first as X.Y will only yield results
|
87
|
+
#
|
88
|
+
# This will add an additional request to search for both X.Y and X.Y.0 but
|
89
|
+
# will give preference to the version format specified passed in
|
90
|
+
watched_app_version_alternate = alternate_version(watched_app_version)
|
91
|
+
versions = [watched_app_version, watched_app_version_alternate].compact
|
92
|
+
|
93
|
+
if versions.empty?
|
94
|
+
if select_latest
|
95
|
+
message = watched_build_version.nil? ? "Searching for the latest build" : "Searching for the latest build with build number: #{watched_build_version}"
|
96
|
+
UI.message(message)
|
97
|
+
versions = [nil]
|
98
|
+
else
|
99
|
+
raise BuildWatcherError.new, "There is no app version to watch"
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
version_matches = versions.map do |version|
|
104
|
+
match = VersionMatches.new
|
105
|
+
match.version = version
|
106
|
+
match.builds = Spaceship::ConnectAPI::Build.all(
|
107
|
+
app_id: app_id,
|
108
|
+
version: version,
|
109
|
+
build_number: watched_build_version,
|
110
|
+
platform: platform
|
111
|
+
)
|
112
|
+
|
113
|
+
match
|
114
|
+
end.flatten
|
115
|
+
|
116
|
+
# Raise error if more than 1 build is returned
|
117
|
+
# This should never happen but need to inform the user if it does
|
118
|
+
matched_builds = version_matches.map(&:builds).flatten
|
119
|
+
if matched_builds.size > 1 && !select_latest
|
120
|
+
error_builds = matched_builds.map do |build|
|
121
|
+
"#{build.app_version}(#{build.version}) for #{build.platform} - #{build.processing_state}"
|
122
|
+
end.join("\n")
|
123
|
+
error_message = "Found more than 1 matching build: \n#{error_builds}"
|
124
|
+
raise BuildWatcherError.new, error_message
|
125
|
+
end
|
126
|
+
|
127
|
+
version_match = version_matches.reject do |match|
|
128
|
+
match.builds.empty?
|
129
|
+
end.first
|
130
|
+
matched_build = version_match&.builds&.first
|
131
|
+
|
132
|
+
return matched_build, version_match&.version
|
133
|
+
end
|
134
|
+
|
135
|
+
def alternate_version(version)
|
136
|
+
return nil if version.nil?
|
137
|
+
|
138
|
+
version_info = Gem::Version.new(version)
|
139
|
+
if version_info.segments.size == 3 && version_info.segments[2] == 0
|
140
|
+
return version_info.segments[0..1].join(".")
|
141
|
+
elsif version_info.segments.size == 2
|
142
|
+
return "#{version}.0"
|
143
|
+
end
|
144
|
+
|
145
|
+
return nil
|
146
|
+
end
|
147
|
+
|
148
|
+
def processed?(build: nil, wait_for_build_beta_detail_processing: false)
|
149
|
+
return false unless build
|
150
|
+
|
151
|
+
is_processed = build.processed?
|
152
|
+
|
153
|
+
# App Store Connect API has multiple build processing states
|
154
|
+
# builds have one processing status
|
155
|
+
# buildBetaDetails have two processing statues (internal and external testing)
|
156
|
+
#
|
157
|
+
# If set, this method will only return true if all three statuses are complete
|
158
|
+
if wait_for_build_beta_detail_processing
|
159
|
+
is_processed &&= (build.build_beta_detail&.processed? || false)
|
160
|
+
end
|
161
|
+
|
162
|
+
return is_processed
|
163
|
+
end
|
164
|
+
|
165
|
+
def report_status(build: nil, wait_for_build_beta_detail_processing: false)
|
166
|
+
is_processed = processed?(build: build, wait_for_build_beta_detail_processing: wait_for_build_beta_detail_processing)
|
167
|
+
|
168
|
+
if build && !is_processed
|
169
|
+
UI.message("Waiting for App Store Connect to finish processing the new build (#{build.app_version} - #{build.version}) for #{build.platform}")
|
170
|
+
elsif build && is_processed
|
171
|
+
UI.success("Successfully finished processing the build #{build.app_version} - #{build.version} for #{build.platform}")
|
172
|
+
else
|
173
|
+
UI.message("Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)")
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
def force_stop_build_watching_if_required(start_time: nil, timeout_duration: nil)
|
178
|
+
return if start_time.nil? || timeout_duration.nil? # keep watching build for App Store Connect processing
|
179
|
+
|
180
|
+
current_time = Time.new
|
181
|
+
end_time = start_time + timeout_duration
|
182
|
+
pending_duration = end_time - current_time
|
183
|
+
|
184
|
+
if current_time > end_time
|
185
|
+
UI.crash!("FastlaneCore::BuildWatcher exceeded the '#{timeout_duration.to_i}' seconds, Stopping now!")
|
186
|
+
else
|
187
|
+
UI.verbose("Will timeout watching build after pending #{pending_duration.to_i} seconds around #{end_time}...")
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
@@ -0,0 +1,211 @@
|
|
1
|
+
require 'tempfile'
|
2
|
+
require 'openssl'
|
3
|
+
|
4
|
+
require_relative 'features'
|
5
|
+
require_relative 'helper'
|
6
|
+
|
7
|
+
# WWDR Intermediate Certificates in https://www.apple.com/certificateauthority/
|
8
|
+
WWDRCA_CERTIFICATES = [
|
9
|
+
{
|
10
|
+
alias: 'G1',
|
11
|
+
sha256: 'ce057691d730f89ca25e916f7335f4c8a15713dcd273a658c024023f8eb809c2',
|
12
|
+
url: 'https://developer.apple.com/certificationauthority/AppleWWDRCA.cer'
|
13
|
+
},
|
14
|
+
{
|
15
|
+
alias: 'G2',
|
16
|
+
sha256: '9ed4b3b88c6a339cf1387895bda9ca6ea31a6b5ce9edf7511845923b0c8ac94c',
|
17
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG2.cer'
|
18
|
+
},
|
19
|
+
{
|
20
|
+
alias: 'G3',
|
21
|
+
sha256: 'dcf21878c77f4198e4b4614f03d696d89c66c66008d4244e1b99161aac91601f',
|
22
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer'
|
23
|
+
},
|
24
|
+
{
|
25
|
+
alias: 'G4',
|
26
|
+
sha256: 'ea4757885538dd8cb59ff4556f676087d83c85e70902c122e42c0808b5bce14c',
|
27
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG4.cer'
|
28
|
+
},
|
29
|
+
{
|
30
|
+
alias: 'G5',
|
31
|
+
sha256: '53fd008278e5a595fe1e908ae9c5e5675f26243264a5a6438c023e3ce2870760',
|
32
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG5.cer'
|
33
|
+
},
|
34
|
+
{
|
35
|
+
alias: 'G6',
|
36
|
+
sha256: 'bdd4ed6e74691f0c2bfd01be0296197af1379e0418e2d300efa9c3bef642ca30',
|
37
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG6.cer'
|
38
|
+
}
|
39
|
+
]
|
40
|
+
|
41
|
+
module FastlaneCore
|
42
|
+
# This class checks if a specific certificate is installed on the current mac
|
43
|
+
class CertChecker
|
44
|
+
def self.installed?(path, in_keychain: nil)
|
45
|
+
UI.user_error!("Could not find file '#{path}'") unless File.exist?(path)
|
46
|
+
|
47
|
+
ids = installed_identies(in_keychain: in_keychain)
|
48
|
+
ids += installed_installers(in_keychain: in_keychain)
|
49
|
+
finger_print = sha1_fingerprint(path)
|
50
|
+
|
51
|
+
return ids.include?(finger_print)
|
52
|
+
end
|
53
|
+
|
54
|
+
# Legacy Method, use `installed?` instead
|
55
|
+
def self.is_installed?(path)
|
56
|
+
installed?(path)
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.installed_identies(in_keychain: nil)
|
60
|
+
install_missing_wwdr_certificates
|
61
|
+
|
62
|
+
available = list_available_identities(in_keychain: in_keychain)
|
63
|
+
# Match for this text against word boundaries to avoid edge cases around multiples of 10 identities!
|
64
|
+
if /\b0 valid identities found\b/ =~ available
|
65
|
+
UI.error([
|
66
|
+
"There are no local code signing identities found.",
|
67
|
+
"You can run" << " `security find-identity -v -p codesigning #{in_keychain}".rstrip << "` to get this output.",
|
68
|
+
"This Stack Overflow thread has more information: https://stackoverflow.com/q/35390072/774.",
|
69
|
+
"(Check in Keychain Access for an expired WWDR certificate: https://stackoverflow.com/a/35409835/774 has more info.)"
|
70
|
+
].join("\n"))
|
71
|
+
end
|
72
|
+
|
73
|
+
ids = []
|
74
|
+
available.split("\n").each do |current|
|
75
|
+
next if current.include?("REVOKED")
|
76
|
+
begin
|
77
|
+
(ids << current.match(/.*\) ([[:xdigit:]]*) \".*/)[1])
|
78
|
+
rescue
|
79
|
+
# the last line does not match
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
return ids
|
84
|
+
end
|
85
|
+
|
86
|
+
def self.installed_installers(in_keychain: nil)
|
87
|
+
available = self.list_available_third_party_mac_installer(in_keychain: in_keychain)
|
88
|
+
available += self.list_available_developer_id_installer(in_keychain: in_keychain)
|
89
|
+
|
90
|
+
return available.scan(/^SHA-1 hash: ([[:xdigit:]]+)$/).flatten
|
91
|
+
end
|
92
|
+
|
93
|
+
def self.list_available_identities(in_keychain: nil)
|
94
|
+
# -v Show valid identities only (default is to show all identities)
|
95
|
+
# -p Specify policy to evaluate
|
96
|
+
commands = ['security find-identity -v -p codesigning']
|
97
|
+
commands << in_keychain if in_keychain
|
98
|
+
`#{commands.join(' ')}`
|
99
|
+
end
|
100
|
+
|
101
|
+
def self.list_available_third_party_mac_installer(in_keychain: nil)
|
102
|
+
# -Z Print SHA-256 (and SHA-1) hash of the certificate
|
103
|
+
# -a Find all matching certificates, not just the first one
|
104
|
+
# -c Match on "name" when searching (optional)
|
105
|
+
commands = ['security find-certificate -Z -a -c "3rd Party Mac Developer Installer"']
|
106
|
+
commands << in_keychain if in_keychain
|
107
|
+
`#{commands.join(' ')}`
|
108
|
+
end
|
109
|
+
|
110
|
+
def self.list_available_developer_id_installer(in_keychain: nil)
|
111
|
+
# -Z Print SHA-256 (and SHA-1) hash of the certificate
|
112
|
+
# -a Find all matching certificates, not just the first one
|
113
|
+
# -c Match on "name" when searching (optional)
|
114
|
+
commands = ['security find-certificate -Z -a -c "Developer ID Installer"']
|
115
|
+
commands << in_keychain if in_keychain
|
116
|
+
`#{commands.join(' ')}`
|
117
|
+
end
|
118
|
+
|
119
|
+
def self.installed_wwdr_certificates
|
120
|
+
certificate_name = "Apple Worldwide Developer Relations"
|
121
|
+
|
122
|
+
# Find all installed WWDRCA certificates
|
123
|
+
installed_certs = []
|
124
|
+
Helper.backticks("security find-certificate -a -c '#{certificate_name}' -p #{wwdr_keychain.shellescape}")
|
125
|
+
.lines
|
126
|
+
.each do |line|
|
127
|
+
if line.start_with?('-----BEGIN CERTIFICATE-----')
|
128
|
+
installed_certs << line
|
129
|
+
else
|
130
|
+
installed_certs.last << line
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
# Get the alias (see `WWDRCA_CERTIFICATES`) of the installed WWDRCA certificates
|
135
|
+
installed_certs
|
136
|
+
.map do |pem|
|
137
|
+
sha256 = Digest::SHA256.hexdigest(OpenSSL::X509::Certificate.new(pem).to_der)
|
138
|
+
WWDRCA_CERTIFICATES.find { |c| c[:sha256].casecmp?(sha256) }&.fetch(:alias)
|
139
|
+
end
|
140
|
+
.compact
|
141
|
+
end
|
142
|
+
|
143
|
+
def self.install_missing_wwdr_certificates
|
144
|
+
# Install all Worldwide Developer Relations Intermediate Certificates listed here: https://www.apple.com/certificateauthority/
|
145
|
+
missing = WWDRCA_CERTIFICATES.map { |c| c[:alias] } - installed_wwdr_certificates
|
146
|
+
missing.each do |cert_alias|
|
147
|
+
install_wwdr_certificate(cert_alias)
|
148
|
+
end
|
149
|
+
missing.count
|
150
|
+
end
|
151
|
+
|
152
|
+
def self.install_wwdr_certificate(cert_alias)
|
153
|
+
url = WWDRCA_CERTIFICATES.find { |c| c[:alias] == cert_alias }.fetch(:url)
|
154
|
+
file = Tempfile.new(File.basename(url))
|
155
|
+
filename = file.path
|
156
|
+
keychain = wwdr_keychain
|
157
|
+
keychain = "-k #{keychain.shellescape}" unless keychain.empty?
|
158
|
+
|
159
|
+
# Attempts to fix an issue installing WWDR cert tends to fail on CIs
|
160
|
+
# https://github.com/fastlane/fastlane/issues/20960
|
161
|
+
curl_extras = ""
|
162
|
+
if FastlaneCore::Feature.enabled?('FASTLANE_WWDR_USE_HTTP1_AND_RETRIES')
|
163
|
+
curl_extras = "--http1.1 --retry 3 --retry-all-errors "
|
164
|
+
end
|
165
|
+
|
166
|
+
import_command = "curl #{curl_extras}-f -o #{filename} #{url} && security import #{filename} #{keychain}"
|
167
|
+
UI.verbose("Installing WWDR Cert: #{import_command}")
|
168
|
+
|
169
|
+
require 'open3'
|
170
|
+
stdout, stderr, status = Open3.capture3(import_command)
|
171
|
+
if FastlaneCore::Globals.verbose?
|
172
|
+
UI.command_output(stdout)
|
173
|
+
UI.command_output(stderr)
|
174
|
+
end
|
175
|
+
|
176
|
+
unless status.success?
|
177
|
+
UI.verbose("Failed to install WWDR Certificate, checking output to see why")
|
178
|
+
# Check the command output, WWDR might already exist
|
179
|
+
unless /The specified item already exists in the keychain./ =~ stderr
|
180
|
+
UI.user_error!("Could not install WWDR certificate")
|
181
|
+
end
|
182
|
+
UI.verbose("WWDR Certificate was already installed")
|
183
|
+
end
|
184
|
+
return true
|
185
|
+
end
|
186
|
+
|
187
|
+
def self.wwdr_keychain
|
188
|
+
priority = [
|
189
|
+
"security default-keychain -d user",
|
190
|
+
"security list-keychains -d user"
|
191
|
+
]
|
192
|
+
priority.each do |command|
|
193
|
+
keychains = Helper.backticks(command, print: FastlaneCore::Globals.verbose?).split("\n")
|
194
|
+
unless keychains.empty?
|
195
|
+
# Select first keychain name from returned keychains list
|
196
|
+
return keychains[0].strip.tr('"', '')
|
197
|
+
end
|
198
|
+
end
|
199
|
+
return ""
|
200
|
+
end
|
201
|
+
|
202
|
+
def self.sha1_fingerprint(path)
|
203
|
+
file_data = File.read(path.to_s)
|
204
|
+
cert = OpenSSL::X509::Certificate.new(file_data)
|
205
|
+
return OpenSSL::Digest::SHA1.new(cert.to_der).to_s.upcase
|
206
|
+
rescue => error
|
207
|
+
UI.error(error)
|
208
|
+
UI.user_error!("Error parsing certificate '#{path}'")
|
209
|
+
end
|
210
|
+
end
|
211
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'fastlane_core'
|
2
|
+
require 'open3'
|
3
|
+
|
4
|
+
module FastlaneCore
|
5
|
+
class Clipboard
|
6
|
+
def self.copy(content: nil)
|
7
|
+
return UI.crash!("'pbcopy' or 'pbpaste' command not found.") unless is_supported?
|
8
|
+
Open3.popen3('pbcopy') { |input, _, _| input << content }
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.paste
|
12
|
+
return UI.crash!("'pbcopy' or 'pbpaste' command not found.") unless is_supported?
|
13
|
+
return `pbpaste`
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.is_supported?
|
17
|
+
return `which pbcopy`.length > 0 && `which pbpaste`.length > 0
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
require_relative 'ui/ui'
|
2
|
+
require_relative 'globals'
|
3
|
+
require_relative 'fastlane_pty'
|
4
|
+
|
5
|
+
module FastlaneCore
|
6
|
+
# Executes commands and takes care of error handling and more
|
7
|
+
class CommandExecutor
|
8
|
+
class << self
|
9
|
+
# Cross-platform way of finding an executable in the $PATH. Respects the $PATHEXT, which lists
|
10
|
+
# valid file extensions for executables on Windows.
|
11
|
+
#
|
12
|
+
# which('ruby') #=> /usr/bin/ruby
|
13
|
+
#
|
14
|
+
# Derived from https://stackoverflow.com/a/5471032/3005
|
15
|
+
def which(cmd)
|
16
|
+
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
|
17
|
+
cmd_path = File.join(path, cmd)
|
18
|
+
executable_path = Helper.get_executable_path(cmd_path)
|
19
|
+
return executable_path if Helper.executable?(executable_path)
|
20
|
+
end
|
21
|
+
|
22
|
+
return nil
|
23
|
+
end
|
24
|
+
|
25
|
+
# @param command [String] The command to be executed
|
26
|
+
# @param print_all [Boolean] Do we want to print out the command output while running?
|
27
|
+
# @param print_command [Boolean] Should we print the command that's being executed
|
28
|
+
# @param error [Block] A block that's called if an error occurs
|
29
|
+
# @param prefix [Array] An array containing a prefix + block which might get applied to the output
|
30
|
+
# @param loading [String] A loading string that is shown before the first output
|
31
|
+
# @param suppress_output [Boolean] Should we print the command's output?
|
32
|
+
# @return [String] All the output as string
|
33
|
+
def execute(command: nil, print_all: false, print_command: true, error: nil, prefix: nil, loading: nil, suppress_output: false)
|
34
|
+
print_all = true if FastlaneCore::Globals.verbose?
|
35
|
+
prefix ||= {}
|
36
|
+
|
37
|
+
output = []
|
38
|
+
command = command.join(" ") if command.kind_of?(Array)
|
39
|
+
UI.command(command) if print_command
|
40
|
+
|
41
|
+
if print_all && loading # this is only used to show the "Loading text"...
|
42
|
+
UI.command_output(loading)
|
43
|
+
end
|
44
|
+
|
45
|
+
begin
|
46
|
+
status = FastlaneCore::FastlanePty.spawn(command) do |command_stdout, command_stdin, pid|
|
47
|
+
command_stdout.each do |l|
|
48
|
+
line = l.chomp
|
49
|
+
line = line[1..-1] if line[0] == "\r"
|
50
|
+
output << line
|
51
|
+
|
52
|
+
next unless print_all
|
53
|
+
|
54
|
+
# Prefix the current line with a string
|
55
|
+
prefix.each do |element|
|
56
|
+
line = element[:prefix] + line if element[:block] && element[:block].call(line)
|
57
|
+
end
|
58
|
+
|
59
|
+
UI.command_output(line) unless suppress_output
|
60
|
+
end
|
61
|
+
end
|
62
|
+
rescue => ex
|
63
|
+
# FastlanePty adds exit_status on to StandardError so every error will have a status code
|
64
|
+
status = ex.exit_status
|
65
|
+
|
66
|
+
# This could happen when the environment is wrong:
|
67
|
+
# > invalid byte sequence in US-ASCII (ArgumentError)
|
68
|
+
output << ex.to_s
|
69
|
+
o = output.join("\n")
|
70
|
+
puts(o)
|
71
|
+
if error
|
72
|
+
error.call(o, nil)
|
73
|
+
else
|
74
|
+
raise ex
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Exit status for build command, should be 0 if build succeeded
|
79
|
+
if status != 0
|
80
|
+
o = output.join("\n")
|
81
|
+
puts(o) unless suppress_output # the user has the right to see the raw output
|
82
|
+
UI.error("Exit status: #{status}")
|
83
|
+
if error
|
84
|
+
error.call(o, status)
|
85
|
+
else
|
86
|
+
UI.user_error!("Exit status: #{status}")
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
return output.join("\n")
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
require 'commander'
|
2
|
+
|
3
|
+
require_relative '../module'
|
4
|
+
require_relative '../ui/ui'
|
5
|
+
|
6
|
+
module FastlaneCore
|
7
|
+
class CommanderGenerator
|
8
|
+
include Commander::Methods
|
9
|
+
|
10
|
+
# Calls the appropriate methods for commander to show the available parameters
|
11
|
+
def generate(options, command: nil)
|
12
|
+
# First, enable `always_trace`, to show the stack trace
|
13
|
+
always_trace!
|
14
|
+
|
15
|
+
used_switches = []
|
16
|
+
options.each do |option|
|
17
|
+
next if option.description.to_s.empty? # "private" options
|
18
|
+
next unless option.display_in_shell
|
19
|
+
|
20
|
+
short_switch = option.short_option
|
21
|
+
key = option.key
|
22
|
+
validate_short_switch(used_switches, short_switch, key)
|
23
|
+
|
24
|
+
type = option.data_type
|
25
|
+
|
26
|
+
# We added type: Hash to code generation, but Ruby's OptionParser doesn't like that
|
27
|
+
# so we need to switch that to something that is supported, luckily, we have an `is_string`
|
28
|
+
# property and if that is false, we'll default to nil
|
29
|
+
if type == Hash
|
30
|
+
type = option.is_string ? String : nil
|
31
|
+
end
|
32
|
+
|
33
|
+
# OptionParser doesn't like symbol but a symbol and string can be easily cast with `to_sym` and `to_s`
|
34
|
+
if type == Symbol
|
35
|
+
type = String
|
36
|
+
end
|
37
|
+
|
38
|
+
# Boolean is a fastlane thing, it's either TrueClass, or FalseClass, but we won't know
|
39
|
+
# that until runtime, so nil is the best we get
|
40
|
+
if type == Fastlane::Boolean
|
41
|
+
type = nil
|
42
|
+
end
|
43
|
+
|
44
|
+
# This is an important bit of trickery to solve the boolean option situation.
|
45
|
+
#
|
46
|
+
# Typically, boolean command line flags do not accept trailing values. If the flag
|
47
|
+
# is present, the value is true, if it is missing, the value is false. fastlane
|
48
|
+
# supports this style of flag. For example, you can specify a flag like `--clean`,
|
49
|
+
# and the :clean option will be true.
|
50
|
+
#
|
51
|
+
# However, fastlane also supports another boolean flag style that accepts trailing
|
52
|
+
# values much like options for Strings and other value types. That looks like
|
53
|
+
# `--include_bitcode false` The problem is that this does not work out of the box
|
54
|
+
# for Commander and OptionsParser. So, we need to get tricky.
|
55
|
+
#
|
56
|
+
# The value_appendix below acts as a placeholder in the switch definition that
|
57
|
+
# states that we expect to have a trailing value for our options. When an option
|
58
|
+
# declares a data type, we use the name of that data type in all caps like:
|
59
|
+
# "--devices ARRAY". When the data type is nil, this implies that we're going
|
60
|
+
# to be doing some special handling on that value. One special thing we do
|
61
|
+
# automatically in Configuration is to coerce special Strings into boolean values.
|
62
|
+
#
|
63
|
+
# If the data type is nil, the trick we do is to specify a value placeholder, but
|
64
|
+
# we wrap it in [] brackets to mark it as optional. That means that the trailing
|
65
|
+
# value may or may not be present for this flag. If the flag is present, but the
|
66
|
+
# value is not, we get a value of `true`. Perfect for the boolean flag base-case!
|
67
|
+
# If the value is there, we'll actually get it back as a String, which we can
|
68
|
+
# later coerce into a boolean.
|
69
|
+
#
|
70
|
+
# In this way we support handling boolean flags with or without trailing values.
|
71
|
+
value_appendix = (type || '[VALUE]').to_s.upcase
|
72
|
+
long_switch = "--#{option.key} #{value_appendix}"
|
73
|
+
|
74
|
+
description = option.description
|
75
|
+
description += " (#{option.env_names.join(', ')})" unless option.env_names.empty?
|
76
|
+
|
77
|
+
# We compact this array here to remove the short_switch variable if it is nil.
|
78
|
+
# Passing a nil value to global_option has been shown to create problems with
|
79
|
+
# option parsing!
|
80
|
+
#
|
81
|
+
# See: https://github.com/fastlane/fastlane_core/pull/89
|
82
|
+
#
|
83
|
+
# If we don't have a data type for this option, we tell it to act like a String.
|
84
|
+
# This allows us to get a reasonable value for boolean options that can be
|
85
|
+
# automatically coerced or otherwise handled by the ConfigItem for others.
|
86
|
+
args = [short_switch, long_switch, (type || String), description].compact
|
87
|
+
|
88
|
+
if command
|
89
|
+
command.option(*args)
|
90
|
+
else
|
91
|
+
# This is the call to Commander to set up the option we've been building.
|
92
|
+
global_option(*args)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
def validate_short_switch(used_switches, short_switch, key)
|
98
|
+
return if short_switch.nil?
|
99
|
+
|
100
|
+
UI.user_error!("Short option #{short_switch} already taken for key #{key}") if used_switches.include?(short_switch)
|
101
|
+
UI.user_error!("-v is already used for the fastlane version (key #{key})") if short_switch == "-v"
|
102
|
+
UI.user_error!("-h is already used for the fastlane help screen (key #{key})") if short_switch == "-h"
|
103
|
+
UI.user_error!("-t is already used for the fastlane trace screen (key #{key})") if short_switch == "-t"
|
104
|
+
|
105
|
+
used_switches << short_switch
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|