fastlane 1.111.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +76 -111
- data/bin/bin-proxy +19 -0
- data/cert/README.md +163 -0
- data/cert/lib/cert.rb +18 -0
- data/cert/lib/cert/commands_generator.rb +51 -0
- data/cert/lib/cert/options.rb +67 -0
- data/cert/lib/cert/runner.rb +181 -0
- data/credentials_manager/README.md +62 -0
- data/credentials_manager/lib/credentials_manager.rb +12 -0
- data/credentials_manager/lib/credentials_manager/account_manager.rb +104 -0
- data/credentials_manager/lib/credentials_manager/appfile_config.rb +186 -0
- data/credentials_manager/lib/credentials_manager/cli.rb +65 -0
- data/deliver/README.md +271 -0
- data/deliver/lib/assets/DeliverfileDefault +10 -0
- data/deliver/lib/assets/ScreenshotsHelp +7 -0
- data/deliver/lib/assets/summary.html.erb +210 -0
- data/deliver/lib/deliver.rb +31 -0
- data/deliver/lib/deliver/app_screenshot.rb +226 -0
- data/deliver/lib/deliver/commands_generator.rb +150 -0
- data/deliver/lib/deliver/detect_values.rb +69 -0
- data/deliver/lib/deliver/download_screenshots.rb +46 -0
- data/deliver/lib/deliver/generate_summary.rb +9 -0
- data/deliver/lib/deliver/html_generator.rb +58 -0
- data/deliver/lib/deliver/loader.rb +18 -0
- data/deliver/lib/deliver/options.rb +269 -0
- data/deliver/lib/deliver/runner.rb +99 -0
- data/deliver/lib/deliver/setup.rb +78 -0
- data/deliver/lib/deliver/submit_for_review.rb +87 -0
- data/deliver/lib/deliver/upload_assets.rb +22 -0
- data/deliver/lib/deliver/upload_metadata.rb +191 -0
- data/deliver/lib/deliver/upload_price_tier.rb +21 -0
- data/deliver/lib/deliver/upload_screenshots.rb +110 -0
- data/fastlane/README.md +193 -0
- data/{lib → fastlane/lib}/assets/Actions.md.erb +0 -0
- data/{lib → fastlane/lib}/assets/AppfileTemplate +0 -0
- data/{lib → fastlane/lib}/assets/AppfileTemplateAndroid +0 -0
- data/{lib → fastlane/lib}/assets/AvailablePlugins.md.erb +0 -0
- data/{lib → fastlane/lib}/assets/DefaultFastfileTemplate +2 -2
- data/{lib → fastlane/lib}/assets/FastfileTemplateAndroid +2 -2
- data/{lib → fastlane/lib}/assets/completions/completion.bash +0 -0
- data/{lib → fastlane/lib}/assets/completions/completion.sh +0 -0
- data/{lib → fastlane/lib}/assets/completions/completion.zsh +0 -0
- data/{lib → fastlane/lib}/assets/custom_action_template.rb +0 -0
- data/{lib → fastlane/lib}/assets/mailgun_html_template.erb +0 -0
- data/{lib → fastlane/lib}/assets/report_template.xml.erb +0 -0
- data/{lib → fastlane/lib}/assets/s3_html_template.erb +0 -0
- data/{lib → fastlane/lib}/assets/s3_plist_template.erb +0 -0
- data/{lib → fastlane/lib}/assets/s3_version_template.erb +0 -0
- data/{lib → fastlane/lib}/fastlane.rb +3 -3
- data/{lib → fastlane/lib}/fastlane/action.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/action_collector.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/README.md +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/actions_helper.rb +16 -0
- data/{lib → fastlane/lib}/fastlane/actions/adb.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/adb_devices.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/add_git_tag.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/app_store_build_number.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/appaloosa.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/appetize.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/appetize_viewing_url_generator.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/appium.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/appledoc.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/appstore.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/apteligent.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/artifactory.rb +2 -0
- data/{lib → fastlane/lib}/fastlane/actions/backup_file.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/backup_xcarchive.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/badge.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/build_and_upload_to_appetize.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/bundle_install.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/carthage.rb +1 -1
- data/{lib → fastlane/lib}/fastlane/actions/cert.rb +0 -4
- data/{lib → fastlane/lib}/fastlane/actions/changelog_from_git_commits.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/chatwork.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/clean_build_artifacts.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/clean_cocoapods_cache.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/clear_derived_data.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/clipboard.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/cloc.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/cocoapods.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/commit_version_bump.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/copy_artifacts.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/crashlytics.rb +2 -0
- data/{lib → fastlane/lib}/fastlane/actions/create_keychain.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/create_pull_request.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/danger.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/debug.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/default_platform.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/delete_keychain.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/deliver.rb +0 -4
- data/{lib → fastlane/lib}/fastlane/actions/deploygate.rb +34 -19
- data/{lib → fastlane/lib}/fastlane/actions/device_grid/README.md +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/dotgpg_environment.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/download.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/download_dsyms.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/dsym_zip.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/ensure_git_branch.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/ensure_git_status_clean.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/ensure_no_debug_code.rb +10 -2
- data/{lib → fastlane/lib}/fastlane/actions/ensure_xcode_version.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/erb.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/fastlane_version.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/flock.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/frameit.rb +6 -10
- data/{lib → fastlane/lib}/fastlane/actions/gcovr.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/get_build_number.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/get_build_number_repository.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/get_github_release.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/get_info_plist_value.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/get_ipa_info_plist_value.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/get_version_number.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/git_add.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/git_branch.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/git_commit.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/git_pull.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/git_tag_exists.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/gradle.rb +0 -0
- data/fastlane/lib/fastlane/actions/gym.rb +84 -0
- data/{lib → fastlane/lib}/fastlane/actions/hg_add_tag.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/hg_commit_version_bump.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/hg_ensure_clean_status.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/hg_push.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/hipchat.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/hockey.rb +37 -11
- data/{lib → fastlane/lib}/fastlane/actions/ifttt.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/import.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/import_certificate.rb +2 -0
- data/{lib → fastlane/lib}/fastlane/actions/import_from_git.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/increment_build_number.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/increment_version_number.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/install_on_device.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/install_xcode_plugin.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/installr.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/ipa.rb +12 -4
- data/{lib → fastlane/lib}/fastlane/actions/is_ci.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/jazzy.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/jira.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/lane_context.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/last_git_commit.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/last_git_tag.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/latest_testflight_build_number.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/lcov.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/mailgun.rb +2 -0
- data/{lib → fastlane/lib}/fastlane/actions/make_changelog_from_jenkins.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/match.rb +3 -9
- data/{lib → fastlane/lib}/fastlane/actions/nexus_upload.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/notification.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/notify.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/number_of_commits.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/oclint.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/onesignal.rb +3 -0
- data/{lib → fastlane/lib}/fastlane/actions/opt_out_usage.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/pem.rb +9 -15
- data/{lib → fastlane/lib}/fastlane/actions/pilot.rb +6 -12
- data/{lib → fastlane/lib}/fastlane/actions/pod_lib_lint.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/pod_push.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/podio_item.rb +2 -0
- data/{lib → fastlane/lib}/fastlane/actions/produce.rb +7 -11
- data/{lib → fastlane/lib}/fastlane/actions/prompt.rb +5 -2
- data/{lib → fastlane/lib}/fastlane/actions/push_git_tags.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/push_to_git_remote.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/puts.rb +8 -0
- data/{lib → fastlane/lib}/fastlane/actions/read_podspec.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/recreate_schemes.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/register_devices.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/reset_git_repo.rb +0 -0
- data/fastlane/lib/fastlane/actions/reset_simulator_contents.rb +62 -0
- data/{lib → fastlane/lib}/fastlane/actions/resign.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/restore_file.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/rocket.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/rsync.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/s3.rb +2 -1
- data/{lib → fastlane/lib}/fastlane/actions/say.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/scan.rb +0 -4
- data/{lib → fastlane/lib}/fastlane/actions/scp.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/screengrab.rb +7 -13
- data/{lib → fastlane/lib}/fastlane/actions/set_build_number_repository.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/set_changelog.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/set_github_release.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/set_info_plist_value.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/set_pod_key.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/setup_jenkins.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/sigh.rb +9 -15
- data/{lib → fastlane/lib}/fastlane/actions/skip_docs.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/slack.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/slather.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/snapshot.rb +5 -11
- data/{lib → fastlane/lib}/fastlane/actions/sonar.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/splunkmint.rb +3 -0
- data/{lib → fastlane/lib}/fastlane/actions/ssh.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/supply.rb +9 -13
- data/{lib → fastlane/lib}/fastlane/actions/swiftlint.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/team_id.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/team_name.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/testfairy.rb +28 -9
- data/{lib → fastlane/lib}/fastlane/actions/testflight.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/tryouts.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/twitter.rb +4 -0
- data/{lib → fastlane/lib}/fastlane/actions/typetalk.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/unlock_keychain.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/update_app_group_identifiers.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/update_app_identifier.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/update_fastlane.rb +1 -20
- data/{lib → fastlane/lib}/fastlane/actions/update_icloud_container_identifiers.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/update_info_plist.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/update_project_code_signing.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/update_project_provisioning.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/update_project_team.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/update_urban_airship_configuration.rb +4 -0
- data/{lib → fastlane/lib}/fastlane/actions/update_url_schemes.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/upload_symbols_to_crashlytics.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/upload_symbols_to_sentry.rb +2 -0
- data/{lib → fastlane/lib}/fastlane/actions/verify_build.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/verify_pod_keys.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/verify_xcode.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/version_bump_podspec.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/version_get_podspec.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/xcode_install.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/xcode_select.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/xcode_server_get_assets.rb +1 -0
- data/{lib → fastlane/lib}/fastlane/actions/xcodebuild.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/xcov.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/xctool.rb +1 -1
- data/{lib → fastlane/lib}/fastlane/actions/xcversion.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/actions/zip.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/auto_complete.rb +0 -0
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +125 -0
- data/{lib → fastlane/lib}/fastlane/command_line_handler.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/commands_generator.rb +5 -4
- data/{lib → fastlane/lib}/fastlane/configuration_helper.rb +0 -1
- data/{lib → fastlane/lib}/fastlane/core_ext/bundler_monkey_patch.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/documentation/actions_list.rb +1 -1
- data/{lib → fastlane/lib}/fastlane/documentation/docs_generator.rb +1 -1
- data/{lib → fastlane/lib}/fastlane/documentation/markdown_docs_generator.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/environment_printer.rb +1 -1
- data/{lib → fastlane/lib}/fastlane/erb_template_helper.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/fast_file.rb +1 -1
- data/{lib → fastlane/lib}/fastlane/fastlane_require.rb +27 -3
- data/{lib → fastlane/lib}/fastlane/features.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/helper/README.md +0 -0
- data/{lib → fastlane/lib}/fastlane/helper/adb_helper.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/helper/cocoapod_helper.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/helper/crashlytics_helper.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/helper/gem_helper.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/helper/git_helper.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/helper/gradle_helper.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/helper/podspec_helper.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/helper/sh_helper.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/helper/xcversion_helper.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/junit_generator.rb +1 -1
- data/{lib → fastlane/lib}/fastlane/lane.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/lane_list.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/lane_manager.rb +25 -6
- data/{lib → fastlane/lib}/fastlane/markdown_table_formatter.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/new_action.rb +1 -1
- data/{lib → fastlane/lib}/fastlane/one_off.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/other_action.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/plugin_fetcher.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/plugin_generator.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/plugin_generator_ui.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/plugin_info.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/plugin_info_collector.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/plugin_manager.rb +4 -4
- data/{lib → fastlane/lib}/fastlane/plugins/plugin_search.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/plugin_update_manager.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/plugins.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/%gem_name%.gemspec.erb +3 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/.gitignore +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/.rspec +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/.rubocop.yml +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/.travis.yml +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/Gemfile +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/LICENSE.erb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/README.md.erb +2 -2
- data/{lib → fastlane/lib}/fastlane/plugins/template/Rakefile +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/circle.yml +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/fastlane/Fastfile.erb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/fastlane/Pluginfile.erb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%.rb.erb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%/actions/%plugin_name%_action.rb.erb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%/helper/%plugin_name%_helper.rb.erb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%/version.rb.erb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/spec/%plugin_name%_action_spec.rb.erb +0 -0
- data/{lib → fastlane/lib}/fastlane/plugins/template/spec/spec_helper.rb.erb +0 -0
- data/{lib → fastlane/lib}/fastlane/runner.rb +25 -2
- data/{lib → fastlane/lib}/fastlane/setup/crashlytics_beta.rb +1 -1
- data/{lib → fastlane/lib}/fastlane/setup/crashlytics_beta_command_line_handler.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/setup/crashlytics_beta_info.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/setup/crashlytics_beta_info_collector.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/setup/crashlytics_beta_ui.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/setup/crashlytics_beta_user_email_fetcher.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/setup/crashlytics_project_parser.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/setup/setup.rb +2 -2
- data/{lib → fastlane/lib}/fastlane/setup/setup_android.rb +2 -2
- data/{lib → fastlane/lib}/fastlane/setup/setup_ios.rb +3 -3
- data/{lib → fastlane/lib}/fastlane/supported_platforms.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/tools.rb +0 -0
- data/{lib → fastlane/lib}/fastlane/version.rb +2 -2
- data/fastlane_core/README.md +54 -0
- data/fastlane_core/lib/assets/XMLTemplate.xml.erb +12 -0
- data/fastlane_core/lib/fastlane_core.rb +48 -0
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +94 -0
- data/fastlane_core/lib/fastlane_core/command_executor.rb +98 -0
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +82 -0
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +133 -0
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +266 -0
- data/fastlane_core/lib/fastlane_core/configuration/configuration_file.rb +82 -0
- data/fastlane_core/lib/fastlane_core/core_ext/string.rb +17 -0
- data/fastlane_core/lib/fastlane_core/device_manager.rb +231 -0
- data/fastlane_core/lib/fastlane_core/env.rb +9 -0
- data/{lib/fastlane → fastlane_core/lib/fastlane_core}/fastlane_folder.rb +1 -11
- data/fastlane_core/lib/fastlane_core/feature/feature.rb +49 -0
- data/fastlane_core/lib/fastlane_core/features.rb +2 -0
- data/fastlane_core/lib/fastlane_core/helper.rb +240 -0
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +55 -0
- data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +44 -0
- data/fastlane_core/lib/fastlane_core/itunes_search_api.rb +48 -0
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +409 -0
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +27 -0
- data/fastlane_core/lib/fastlane_core/languages.rb +11 -0
- data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +42 -0
- data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +44 -0
- data/fastlane_core/lib/fastlane_core/print_table.rb +63 -0
- data/fastlane_core/lib/fastlane_core/project.rb +450 -0
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +69 -0
- data/fastlane_core/lib/fastlane_core/string_filters.rb +34 -0
- data/fastlane_core/lib/fastlane_core/tool_collector.rb +179 -0
- data/fastlane_core/lib/fastlane_core/ui/disable_colors.rb +17 -0
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +190 -0
- data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +50 -0
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +122 -0
- data/fastlane_core/lib/fastlane_core/ui/interface.rb +159 -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 +198 -0
- data/fastlane_core/lib/fastlane_core/xcodebuild_list_output_parser.rb +28 -0
- data/frameit/README.md +284 -0
- data/frameit/lib/assets/empty.png +0 -0
- data/frameit/lib/frameit.rb +52 -0
- data/frameit/lib/frameit/commands_generator.rb +99 -0
- data/frameit/lib/frameit/config_parser.rb +98 -0
- data/frameit/lib/frameit/dependency_checker.rb +20 -0
- data/frameit/lib/frameit/device_types.rb +13 -0
- data/frameit/lib/frameit/editor.rb +351 -0
- data/frameit/lib/frameit/frame_downloader.rb +71 -0
- data/frameit/lib/frameit/mac_editor.rb +32 -0
- data/frameit/lib/frameit/offsets.rb +19 -0
- data/frameit/lib/frameit/options.rb +46 -0
- data/frameit/lib/frameit/runner.rb +45 -0
- data/frameit/lib/frameit/screenshot.rb +89 -0
- data/frameit/lib/frameit/strings_parser.rb +35 -0
- data/frameit/lib/frameit/template_finder.rb +36 -0
- data/gym/README.md +288 -0
- data/gym/lib/assets/GymfileTemplate +13 -0
- data/gym/lib/assets/package_application_patches/0001_codesign_args_patch.diff +38 -0
- data/gym/lib/assets/package_application_patches/0002_no_strict_parameter_patch.diff +42 -0
- data/gym/lib/assets/package_application_patches/PackageApplication_MD5 +2 -0
- data/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh +58 -0
- data/gym/lib/gym.rb +49 -0
- data/gym/lib/gym/commands_generator.rb +62 -0
- data/gym/lib/gym/detect_values.rb +105 -0
- data/gym/lib/gym/error_handler.rb +186 -0
- data/gym/lib/gym/generators/README.md +1 -0
- data/gym/lib/gym/generators/build_command_generator.rb +136 -0
- data/gym/lib/gym/generators/package_command_generator.rb +58 -0
- data/gym/lib/gym/generators/package_command_generator_legacy.rb +102 -0
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +191 -0
- data/gym/lib/gym/manager.rb +17 -0
- data/gym/lib/gym/options.rb +254 -0
- data/gym/lib/gym/runner.rb +256 -0
- data/gym/lib/gym/xcode.rb +21 -0
- data/gym/lib/gym/xcodebuild_fixes/README.md +9 -0
- data/gym/lib/gym/xcodebuild_fixes/generic_archive_fix.rb +32 -0
- data/gym/lib/gym/xcodebuild_fixes/package_application_fix.rb +53 -0
- data/gym/lib/gym/xcodebuild_fixes/swift_fix.rb +99 -0
- data/gym/lib/gym/xcodebuild_fixes/watchkit2_fix.rb +35 -0
- data/gym/lib/gym/xcodebuild_fixes/watchkit_fix.rb +40 -0
- data/match/README.md +414 -0
- data/match/lib/assets/MatchfileTemplate +9 -0
- data/match/lib/assets/READMETemplate.md +49 -0
- data/match/lib/match.rb +57 -0
- data/match/lib/match/change_password.rb +30 -0
- data/match/lib/match/commands_generator.rb +120 -0
- data/match/lib/match/encrypt.rb +93 -0
- data/match/lib/match/generator.rb +74 -0
- data/match/lib/match/git_helper.rb +139 -0
- data/match/lib/match/nuke.rb +190 -0
- data/match/lib/match/options.rb +124 -0
- data/match/lib/match/runner.rb +172 -0
- data/match/lib/match/setup.rb +20 -0
- data/match/lib/match/spaceship_ensure.rb +78 -0
- data/match/lib/match/table_printer.rb +43 -0
- data/match/lib/match/utils.rb +59 -0
- data/pem/README.md +175 -0
- data/pem/lib/pem.rb +21 -0
- data/pem/lib/pem/commands_generator.rb +41 -0
- data/pem/lib/pem/manager.rb +93 -0
- data/pem/lib/pem/options.rb +79 -0
- data/pilot/README.md +285 -0
- data/pilot/lib/pilot.rb +22 -0
- data/pilot/lib/pilot/build_manager.rb +209 -0
- data/pilot/lib/pilot/commands_generator.rb +136 -0
- data/pilot/lib/pilot/features.rb +0 -0
- data/pilot/lib/pilot/manager.rb +71 -0
- data/pilot/lib/pilot/options.rb +161 -0
- data/pilot/lib/pilot/tester_exporter.rb +37 -0
- data/pilot/lib/pilot/tester_importer.rb +51 -0
- data/pilot/lib/pilot/tester_manager.rb +212 -0
- data/pilot/lib/pilot/tester_util.rb +23 -0
- data/produce/README.md +232 -0
- data/produce/lib/produce.rb +21 -0
- data/produce/lib/produce/available_default_languages.rb +36 -0
- data/produce/lib/produce/commands_generator.rb +134 -0
- data/produce/lib/produce/developer_center.rb +58 -0
- data/produce/lib/produce/group.rb +89 -0
- data/produce/lib/produce/itunes_connect.rb +87 -0
- data/produce/lib/produce/manager.rb +11 -0
- data/produce/lib/produce/options.rb +114 -0
- data/produce/lib/produce/service.rb +227 -0
- data/scan/README.md +219 -0
- data/scan/lib/assets/ScanfileTemplate +13 -0
- data/scan/lib/scan.rb +40 -0
- data/scan/lib/scan/commands_generator.rb +61 -0
- data/scan/lib/scan/detect_values.rb +184 -0
- data/scan/lib/scan/error_handler.rb +43 -0
- data/scan/lib/scan/manager.rb +17 -0
- data/scan/lib/scan/options.rb +189 -0
- data/scan/lib/scan/report_collector.rb +70 -0
- data/scan/lib/scan/runner.rb +103 -0
- data/scan/lib/scan/slack_poster.rb +59 -0
- data/scan/lib/scan/test_command_generator.rb +130 -0
- data/scan/lib/scan/test_result_parser.rb +21 -0
- data/screengrab/README.md +190 -0
- data/screengrab/lib/assets/ScreengrabfileTemplate +15 -0
- data/screengrab/lib/screengrab.rb +32 -0
- data/screengrab/lib/screengrab/android_environment.rb +88 -0
- data/screengrab/lib/screengrab/commands_generator.rb +60 -0
- data/screengrab/lib/screengrab/dependency_checker.rb +56 -0
- data/screengrab/lib/screengrab/detect_values.rb +16 -0
- data/screengrab/lib/screengrab/options.rb +109 -0
- data/screengrab/lib/screengrab/page.html.erb +206 -0
- data/screengrab/lib/screengrab/runner.rb +336 -0
- data/screengrab/lib/screengrab/setup.rb +16 -0
- data/sigh/README.md +256 -0
- data/sigh/lib/assets/resign.sh +774 -0
- data/sigh/lib/sigh.rb +19 -0
- data/sigh/lib/sigh/commands_generator.rb +133 -0
- data/sigh/lib/sigh/download_all.rb +36 -0
- data/sigh/lib/sigh/local_manage.rb +140 -0
- data/sigh/lib/sigh/manager.rb +44 -0
- data/sigh/lib/sigh/options.rb +117 -0
- data/sigh/lib/sigh/repair.rb +30 -0
- data/sigh/lib/sigh/resign.rb +201 -0
- data/sigh/lib/sigh/runner.rb +235 -0
- data/snapshot/README.md +400 -0
- data/snapshot/lib/assets/SnapfileTemplate +36 -0
- data/snapshot/lib/assets/SnapshotHelper.swift +138 -0
- data/snapshot/lib/assets/SnapshotHelper2-3.swift +140 -0
- data/snapshot/lib/snapshot.rb +59 -0
- data/snapshot/lib/snapshot/collector.rb +92 -0
- data/snapshot/lib/snapshot/commands_generator.rb +108 -0
- data/snapshot/lib/snapshot/dependency_checker.rb +50 -0
- data/snapshot/lib/snapshot/detect_values.rb +53 -0
- data/snapshot/lib/snapshot/error_handler.rb +22 -0
- data/snapshot/lib/snapshot/fixes/README.md +5 -0
- data/snapshot/lib/snapshot/fixes/hardware_keyboard_fix.rb +14 -0
- data/snapshot/lib/snapshot/fixes/simulator_zoom_fix.rb +25 -0
- data/snapshot/lib/snapshot/latest_os_version.rb +31 -0
- data/snapshot/lib/snapshot/options.rb +161 -0
- data/snapshot/lib/snapshot/page.html.erb +206 -0
- data/snapshot/lib/snapshot/reports_generator.rb +64 -0
- data/snapshot/lib/snapshot/reset_simulators.rb +88 -0
- data/snapshot/lib/snapshot/runner.rb +294 -0
- data/snapshot/lib/snapshot/screenshot_flatten.rb +18 -0
- data/snapshot/lib/snapshot/screenshot_rotate.rb +38 -0
- data/snapshot/lib/snapshot/setup.rb +35 -0
- data/snapshot/lib/snapshot/test_command_generator.rb +118 -0
- data/snapshot/lib/snapshot/update.rb +29 -0
- data/spaceship/README.md +191 -0
- data/spaceship/lib/assets/languageMapping.json +240 -0
- data/spaceship/lib/assets/languageMappingReadable.json +30 -0
- data/spaceship/lib/spaceship.rb +31 -0
- data/spaceship/lib/spaceship/babosa_fix.rb +30 -0
- data/spaceship/lib/spaceship/base.rb +236 -0
- data/spaceship/lib/spaceship/client.rb +487 -0
- data/spaceship/lib/spaceship/commands_generator.rb +48 -0
- data/spaceship/lib/spaceship/du/du_client.rb +122 -0
- data/spaceship/lib/spaceship/du/upload_file.rb +56 -0
- data/spaceship/lib/spaceship/du/utilities.rb +81 -0
- data/spaceship/lib/spaceship/helper/net_http_generic_request.rb +14 -0
- data/spaceship/lib/spaceship/helper/plist_middleware.rb +15 -0
- data/spaceship/lib/spaceship/launcher.rb +94 -0
- data/spaceship/lib/spaceship/playground.rb +72 -0
- data/spaceship/lib/spaceship/portal/app.rb +148 -0
- data/spaceship/lib/spaceship/portal/app_group.rb +77 -0
- data/spaceship/lib/spaceship/portal/app_service.rb +278 -0
- data/spaceship/lib/spaceship/portal/certificate.rb +333 -0
- data/spaceship/lib/spaceship/portal/device.rb +192 -0
- data/spaceship/lib/spaceship/portal/portal.rb +8 -0
- data/spaceship/lib/spaceship/portal/portal_base.rb +13 -0
- data/spaceship/lib/spaceship/portal/portal_client.rb +491 -0
- data/spaceship/lib/spaceship/portal/provisioning_profile.rb +467 -0
- data/spaceship/lib/spaceship/portal/spaceship.rb +112 -0
- data/spaceship/lib/spaceship/portal/ui/select_team.rb +83 -0
- data/spaceship/lib/spaceship/spaceauth_runner.rb +50 -0
- data/spaceship/lib/spaceship/tunes/app_details.rb +139 -0
- data/spaceship/lib/spaceship/tunes/app_image.rb +55 -0
- data/spaceship/lib/spaceship/tunes/app_ratings.rb +107 -0
- data/spaceship/lib/spaceship/tunes/app_screenshot.rb +17 -0
- data/spaceship/lib/spaceship/tunes/app_status.rb +60 -0
- data/spaceship/lib/spaceship/tunes/app_submission.rb +136 -0
- data/spaceship/lib/spaceship/tunes/app_trailer.rb +68 -0
- data/spaceship/lib/spaceship/tunes/app_version.rb +766 -0
- data/spaceship/lib/spaceship/tunes/app_version_common.rb +33 -0
- data/spaceship/lib/spaceship/tunes/app_version_generated_promocodes.rb +35 -0
- data/spaceship/lib/spaceship/tunes/app_version_history.rb +59 -0
- data/spaceship/lib/spaceship/tunes/app_version_promocodes.rb +34 -0
- data/spaceship/lib/spaceship/tunes/app_version_ref.rb +19 -0
- data/spaceship/lib/spaceship/tunes/app_version_states_history.rb +34 -0
- data/spaceship/lib/spaceship/tunes/application.rb +437 -0
- data/spaceship/lib/spaceship/tunes/build.rb +269 -0
- data/spaceship/lib/spaceship/tunes/build_details.rb +48 -0
- data/spaceship/lib/spaceship/tunes/build_train.rb +182 -0
- data/spaceship/lib/spaceship/tunes/device_type.rb +14 -0
- data/spaceship/lib/spaceship/tunes/language_converter.rb +63 -0
- data/spaceship/lib/spaceship/tunes/language_item.rb +56 -0
- data/spaceship/lib/spaceship/tunes/pricing_tier.rb +81 -0
- data/spaceship/lib/spaceship/tunes/recovery_device.rb +69 -0
- data/spaceship/lib/spaceship/tunes/spaceship.rb +34 -0
- data/spaceship/lib/spaceship/tunes/tester.rb +283 -0
- data/spaceship/lib/spaceship/tunes/transit_app_file.rb +27 -0
- data/spaceship/lib/spaceship/tunes/tunes.rb +35 -0
- data/spaceship/lib/spaceship/tunes/tunes_base.rb +15 -0
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +1068 -0
- data/spaceship/lib/spaceship/tunes/user_detail.rb +19 -0
- data/spaceship/lib/spaceship/tunes/version_set.rb +35 -0
- data/spaceship/lib/spaceship/two_step_client.rb +195 -0
- data/spaceship/lib/spaceship/ui.rb +27 -0
- data/supply/README.md +214 -0
- data/supply/lib/supply.rb +29 -0
- data/supply/lib/supply/apk_listing.rb +14 -0
- data/supply/lib/supply/client.rb +345 -0
- data/supply/lib/supply/commands_generator.rb +62 -0
- data/supply/lib/supply/listing.rb +32 -0
- data/supply/lib/supply/options.rb +135 -0
- data/supply/lib/supply/setup.rb +102 -0
- data/supply/lib/supply/uploader.rb +221 -0
- metadata +699 -428
- data/bin//360/237/232/200 +0 -5
- data/lib/.DS_Store +0 -0
- data/lib/assets/.DS_Store +0 -0
- data/lib/assets/completions/.DS_Store +0 -0
- data/lib/fastlane/.DS_Store +0 -0
- data/lib/fastlane/actions/gym.rb +0 -90
- data/lib/fastlane/actions/reset_simulators.rb +0 -44
- data/lib/fastlane/cli_tools_distributor.rb +0 -100
- data/lib/fastlane/setup/.DS_Store +0 -0
@@ -0,0 +1,774 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# Copyright (c) 2011 Float Mobile Learning
|
4
|
+
# http://www.floatlearning.com/
|
5
|
+
# Extension Copyright (c) 2013 Weptun Gmbh
|
6
|
+
# http://www.weptun.de
|
7
|
+
#
|
8
|
+
# Extended by Ronan O Ciosoig January 2012
|
9
|
+
#
|
10
|
+
# Extended by Patrick Blitz, April 2013
|
11
|
+
#
|
12
|
+
# Extended by John Turnipseed and Matthew Nespor, November 2014
|
13
|
+
# http://nanonation.net/
|
14
|
+
#
|
15
|
+
# Extended by Nicolas Bachschmidt, October 2015
|
16
|
+
#
|
17
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
18
|
+
# a copy of this software and associated documentation files (the "Software"),
|
19
|
+
# to deal in the Software without restriction, including without limitation
|
20
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
21
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
22
|
+
# Software is furnished to do so, subject to the following conditions:
|
23
|
+
#
|
24
|
+
# The above copyright notice and this permission notice shall be included
|
25
|
+
# in all copies or substantial portions of the Software.
|
26
|
+
#
|
27
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
28
|
+
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
29
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
30
|
+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
31
|
+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
32
|
+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
33
|
+
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
34
|
+
#
|
35
|
+
# Please let us know about any improvements you make to this script!
|
36
|
+
# ./floatsign source "iPhone Distribution: Name" -p "path/to/profile" [-d "display name"] [-e entitlements] [-k keychain] [-b "BundleIdentifier"] outputIpa
|
37
|
+
#
|
38
|
+
#
|
39
|
+
# Modifed 26th January 2012
|
40
|
+
#
|
41
|
+
# new features January 2012:
|
42
|
+
# 1. change the app display name
|
43
|
+
#
|
44
|
+
# new features April 2013
|
45
|
+
# 1. specify the target bundleId on the command line
|
46
|
+
# 2. correctly handles entitlements for keychain-enabled resigning
|
47
|
+
#
|
48
|
+
# new features November 2014
|
49
|
+
# 1. now re-signs embedded iOS frameworks, if present, prior to re-signing the application itself
|
50
|
+
# 2. extracts the team-identifier from provisioning profile and uses it to update previous entitlements
|
51
|
+
# 3. fixed bug in packaging if -e flag is used
|
52
|
+
# 4. renamed 'temp' directory and made it a variable so it can be easily modified
|
53
|
+
# 5. various code formatting and logging adjustments
|
54
|
+
#
|
55
|
+
# new features October 2015
|
56
|
+
# 1. now re-signs nested applications and app extensions, if present, prior to re-signing the application itself
|
57
|
+
# 2. enables the -p option to be used more than once
|
58
|
+
# 3. ensures the provisioning profile's bundle-identifier matches the app's bundle identifier
|
59
|
+
# 4. extracts the entitlements from the provisioning profile
|
60
|
+
# 5. copy the entitlements as archived-expanded-entitlements.xcent inside the app bundle (because Xcode does too)
|
61
|
+
#
|
62
|
+
|
63
|
+
# Logging functions
|
64
|
+
|
65
|
+
log() {
|
66
|
+
# Make sure it returns 0 code even when verose mode is off (test 1)
|
67
|
+
# To use like [[ condition ]] && log "x" && something
|
68
|
+
[[ -n "$VERBOSE" ]] && echo -e "$@" || test 1
|
69
|
+
}
|
70
|
+
|
71
|
+
error() {
|
72
|
+
echo "$@" >&2
|
73
|
+
exit 1
|
74
|
+
}
|
75
|
+
|
76
|
+
warning() {
|
77
|
+
echo "$@" >&2
|
78
|
+
}
|
79
|
+
|
80
|
+
function checkStatus {
|
81
|
+
|
82
|
+
if [ $? -ne 0 ];
|
83
|
+
then
|
84
|
+
error "Encountered an error, aborting!"
|
85
|
+
fi
|
86
|
+
}
|
87
|
+
|
88
|
+
usage() {
|
89
|
+
echo -e "Usage: $(basename $0) source identity -p|--provisioning provisioning" >&2
|
90
|
+
echo -e "\t\t[-e|--entitlements entitlements]" >&2
|
91
|
+
echo -e "\t\t[-k|--keychain keychain]" >&2
|
92
|
+
echo -e "\t\t[-d|--display-name displayName]" >&2
|
93
|
+
echo -e "\t\t[-n|--version-number version]" >&2
|
94
|
+
echo -e "\t\t[--short-version shortVersion]" >&2
|
95
|
+
echo -e "\t\t[--bundle-version bundleVersion]" >&2
|
96
|
+
echo -e "\t\t[-b|--bundle-id bundleId]" >&2
|
97
|
+
echo -e "\t\t[--use-app-entitlements]" >&2
|
98
|
+
echo -e "\t\toutputIpa" >&2
|
99
|
+
echo "Usage: $(basename $0) -h|--help" >&2
|
100
|
+
echo "Options:" >&2
|
101
|
+
echo -e "\t-p, --provisioning provisioning\t\tProvisioning profile option, may be provided multiple times." >&2
|
102
|
+
echo -e "\t\t\t\t\t\tYou can specify provisioning profile file name." >&2
|
103
|
+
echo -e "\t\t\t\t\t\t\t-p xxx.mobileprovision" >&2
|
104
|
+
echo "" >&2
|
105
|
+
echo -e "\t\t\t\t\t\tAlternatively you may provide multiple provisioning profiles if the application contains" >&2
|
106
|
+
echo -e "\t\t\t\t\t\tnested applications or app extensions, which need their own provisioning" >&2
|
107
|
+
echo -e "\t\t\t\t\t\tprofile. You can do so by providing -p option multiple times specifying" >&2
|
108
|
+
echo -e "\t\t\t\t\t\told bundle identifier and new provisioning profile for that bundle id joined with '='." >&2
|
109
|
+
echo -e "\t\t\t\t\t\t\t-p com.main-app=main-app.mobileprovision" >&2
|
110
|
+
echo -e "\t\t\t\t\t\t\t-p com.nested-app=nested-app.mobileprovision" >&2
|
111
|
+
echo -e "\t\t\t\t\t\t\t-p com.nested-extension=nested-extension.mobileprovision" >&2
|
112
|
+
echo "" >&2
|
113
|
+
echo -e "\t-e, --entitlements entitlements\t\tSpecify entitlements file path for code signing." >&2
|
114
|
+
echo -e "\t-k, --keychain keychain\t\t\tSpecify keychain for code signing." >&2
|
115
|
+
echo -e "\t-d, --display-name displayName\t\tSpecify new display name." >&2
|
116
|
+
echo -e "\t\t\t\t\t\t\tWarning: will apply for all nested apps and extensions." >&2
|
117
|
+
echo -e "\t-n, --version-number version\t\tSpecify new version number." >&2
|
118
|
+
echo -e "\t\t\t\t\t\t\tWill set CFBundleShortVersionString and CFBundleVersion values in Info.plist." >&2
|
119
|
+
echo -e "\t\t\t\t\t\t\tWill apply for all nested apps and extensions." >&2
|
120
|
+
echo -e "\t --short-version shortVersion\tSpecify new short version string (CFBundleShortVersionString)." >&2
|
121
|
+
echo -e "\t\t\t\t\t\t\tWill apply for all nested apps and extensions." >&2
|
122
|
+
echo -e "\t\t\t\t\t\t\tCan't use together with '-n, --version-number' option." >&2
|
123
|
+
echo -e "\t --bundle-version bundleVersion\tSpecify new bundle version (CFBundleVersion) number." >&2
|
124
|
+
echo -e "\t\t\t\t\t\t\tWill apply for all nested apps and extensions." >&2
|
125
|
+
echo -e "\t\t\t\t\t\t\tCan't use together with '-n, --version-number' option." >&2
|
126
|
+
echo -e "\t-b, --bundle-id bundleId\t\tSpecify new bundle identifier (CFBundleIdentifier)." >&2
|
127
|
+
echo -e "\t\t\t\t\t\t\tWarning: will NOT apply for nested apps and extensions." >&2
|
128
|
+
echo -e "\t --use-app-entitlements\t\tExtract app bundle codesigning entitlements and combine with entitlements from new provisionin profile." >&2
|
129
|
+
echo -e "\t\t\t\t\t\t\tCan't use together with '-e, --entitlements' option." >&2
|
130
|
+
echo -e "\t--keychain-path path\t\t\tSpecify the path to a keychain that /usr/bin/codesign should use." >&2
|
131
|
+
echo -e "\t-v, --verbose\t\t\t\tVerbose output." >&2
|
132
|
+
echo -e "\t-h, --help\t\t\t\tDisplay help message." >&2
|
133
|
+
exit 2
|
134
|
+
}
|
135
|
+
|
136
|
+
if [ $# -lt 3 ]; then
|
137
|
+
usage
|
138
|
+
fi
|
139
|
+
|
140
|
+
ORIGINAL_FILE="$1"
|
141
|
+
CERTIFICATE="$2"
|
142
|
+
ENTITLEMENTS=
|
143
|
+
BUNDLE_IDENTIFIER=""
|
144
|
+
DISPLAY_NAME=""
|
145
|
+
KEYCHAIN=""
|
146
|
+
VERSION_NUMBER=""
|
147
|
+
SHORT_VERSION=
|
148
|
+
BUNDLE_VERSION=
|
149
|
+
KEYCHAIN_PATH=
|
150
|
+
RAW_PROVISIONS=()
|
151
|
+
PROVISIONS_BY_ID=()
|
152
|
+
DEFAULT_PROVISION=""
|
153
|
+
TEMP_DIR="_floatsignTemp"
|
154
|
+
USE_APP_ENTITLEMENTS=""
|
155
|
+
|
156
|
+
# List of plist keys used for reference to and from nested apps and extensions
|
157
|
+
NESTED_APP_REFERENCE_KEYS=(":WKCompanionAppBundleIdentifier" ":NSExtension:NSExtensionAttributes:WKAppBundleIdentifier")
|
158
|
+
|
159
|
+
# options start index
|
160
|
+
shift 2
|
161
|
+
|
162
|
+
# Parse args
|
163
|
+
while [ "$1" != "" ]; do
|
164
|
+
case $1 in
|
165
|
+
-p | --provisioning )
|
166
|
+
shift
|
167
|
+
RAW_PROVISIONS+=("$1")
|
168
|
+
;;
|
169
|
+
-e | --entitlements )
|
170
|
+
shift
|
171
|
+
ENTITLEMENTS="$1"
|
172
|
+
;;
|
173
|
+
-d | --display-name )
|
174
|
+
shift
|
175
|
+
DISPLAY_NAME="$1"
|
176
|
+
;;
|
177
|
+
-b | --bundle-id )
|
178
|
+
shift
|
179
|
+
BUNDLE_IDENTIFIER="$1"
|
180
|
+
;;
|
181
|
+
-k | --keychain )
|
182
|
+
shift
|
183
|
+
KEYCHAIN="$1"
|
184
|
+
;;
|
185
|
+
-n | --version-number )
|
186
|
+
shift
|
187
|
+
VERSION_NUMBER="$1"
|
188
|
+
;;
|
189
|
+
--short-version )
|
190
|
+
shift
|
191
|
+
SHORT_VERSION="$1"
|
192
|
+
;;
|
193
|
+
--bundle-version )
|
194
|
+
shift
|
195
|
+
BUNDLE_VERSION="$1"
|
196
|
+
;;
|
197
|
+
--use-app-entitlements )
|
198
|
+
USE_APP_ENTITLEMENTS="YES"
|
199
|
+
;;
|
200
|
+
--keychain-path )
|
201
|
+
shift
|
202
|
+
KEYCHAIN_PATH="$1"
|
203
|
+
;;
|
204
|
+
-v | --verbose )
|
205
|
+
VERBOSE="--verbose"
|
206
|
+
;;
|
207
|
+
-h | --help )
|
208
|
+
usage
|
209
|
+
;;
|
210
|
+
* )
|
211
|
+
[[ -n "$NEW_FILE" ]] && error "Multiple output file names specified!"
|
212
|
+
[[ -z "$NEW_FILE" ]] && NEW_FILE="$1"
|
213
|
+
;;
|
214
|
+
esac
|
215
|
+
|
216
|
+
# Next arg
|
217
|
+
shift
|
218
|
+
done
|
219
|
+
|
220
|
+
KEYCHAIN_FLAG=
|
221
|
+
if [ -n "$KEYCHAIN_PATH" ]
|
222
|
+
then
|
223
|
+
KEYCHAIN_FLAG="--keychain $KEYCHAIN_PATH"
|
224
|
+
fi
|
225
|
+
|
226
|
+
# Log the options
|
227
|
+
for provision in ${RAW_PROVISIONS[@]}; do
|
228
|
+
if [[ "$provision" =~ .+=.+ ]]; then
|
229
|
+
log "Specified provisioning profile: '${provision#*=}' for bundle identifier: '${provision%%=*}'"
|
230
|
+
else
|
231
|
+
log "Specified provisioning profile: '$provision'"
|
232
|
+
fi
|
233
|
+
done
|
234
|
+
|
235
|
+
log "Original file: '$ORIGINAL_FILE'"
|
236
|
+
log "Certificate: '$CERTIFICATE'"
|
237
|
+
[[ -n "${DISPLAY_NAME}" ]] && log "Specified display name: '$DISPLAY_NAME'"
|
238
|
+
[[ -n "${ENTITLEMENTS}" ]] && log "Specified signing entitlements: '$ENTITLEMENTS'"
|
239
|
+
[[ -n "${BUNDLE_IDENTIFIER}" ]] && log "Specified bundle identifier: '$BUNDLE_IDENTIFIER'"
|
240
|
+
[[ -n "${KEYCHAIN}" ]] && log "Specified keychain to use: '$KEYCHAIN'"
|
241
|
+
[[ -n "${VERSION_NUMBER}" ]] && log "Specified version number to use: '$VERSION_NUMBER'"
|
242
|
+
[[ -n "${SHORT_VERSION}" ]] && log "Specified short version to use: '$SHORT_VERSION'"
|
243
|
+
[[ -n "${BUNDLE_VERSION}" ]] && log "Specified bundle version to use: '$BUNDLE_VERSION'"
|
244
|
+
[[ -n "${KEYCHAIN_FLAG}" ]] && log "Specified keychain to use: '$KEYCHAIN_PATH'"
|
245
|
+
[[ -n "${NEW_FILE}" ]] && log "Output file name: '$NEW_FILE'"
|
246
|
+
[[ -n "${USE_APP_ENTITLEMENTS}" ]] && log "Extract app entitlements: YES"
|
247
|
+
|
248
|
+
# Check that version number option is not clashing with short or bundle version options
|
249
|
+
[[ -n "$VERSION_NUMBER" && (-n "$SHORT_VERSION" || -n "$BUNDLE_VERSION") ]] && error "versionNumber option cannot be used in combination with shortVersion or bundleVersion options"
|
250
|
+
|
251
|
+
# Check that --use-app-entitlements and -e, --entitlements are not used at the same time
|
252
|
+
[[ -n "${USE_APP_ENTITLEMENTS}" && -n ${ENTITLEMENTS} ]] && error "--use-app-entitlements option cannot be used in combination with -e, --entitlements option."
|
253
|
+
|
254
|
+
# Check output file name
|
255
|
+
if [ -z "$NEW_FILE" ];
|
256
|
+
then
|
257
|
+
error "Output file name required"
|
258
|
+
fi
|
259
|
+
|
260
|
+
if [[ "${#RAW_PROVISIONS[*]}" == "0" ]]; then
|
261
|
+
error "-p 'xxxx.mobileprovision' argument is required"
|
262
|
+
fi
|
263
|
+
|
264
|
+
# Check for and remove the temporary directory if it already exists
|
265
|
+
if [ -d "$TEMP_DIR" ];
|
266
|
+
then
|
267
|
+
log "Removing previous temporary directory: '$TEMP_DIR'"
|
268
|
+
rm -Rf "$TEMP_DIR"
|
269
|
+
fi
|
270
|
+
|
271
|
+
filename=$(basename "$ORIGINAL_FILE")
|
272
|
+
extension="${filename##*.}"
|
273
|
+
filename="${filename%.*}"
|
274
|
+
|
275
|
+
# Check if the supplied file is an ipa or an app file
|
276
|
+
if [ "${extension}" = "ipa" ]
|
277
|
+
then
|
278
|
+
# Unzip the old ipa quietly
|
279
|
+
unzip -q "$ORIGINAL_FILE" -d $TEMP_DIR
|
280
|
+
checkStatus
|
281
|
+
elif [ "${extension}" = "app" ]
|
282
|
+
then
|
283
|
+
# Copy the app file into an ipa-like structure
|
284
|
+
mkdir -p "$TEMP_DIR/Payload"
|
285
|
+
cp -Rf "${ORIGINAL_FILE}" "$TEMP_DIR/Payload/${filename}.app"
|
286
|
+
checkStatus
|
287
|
+
else
|
288
|
+
error "Error: Only can resign .app files and .ipa files."
|
289
|
+
fi
|
290
|
+
|
291
|
+
# check the keychain
|
292
|
+
if [ "${KEYCHAIN}" != "" ];
|
293
|
+
then
|
294
|
+
security list-keychains -s $KEYCHAIN
|
295
|
+
security unlock $KEYCHAIN
|
296
|
+
security default-keychain -s $KEYCHAIN
|
297
|
+
fi
|
298
|
+
|
299
|
+
# Set the app name
|
300
|
+
# In Payload directory may be another file except .app file, such as StoreKit folder.
|
301
|
+
# Search the first .app file within the Payload directory
|
302
|
+
APP_NAME=$(ls "$TEMP_DIR/Payload/"|grep ".app$"| head -1)
|
303
|
+
|
304
|
+
# Make sure that PATH includes the location of the PlistBuddy helper tool as its location is not standard
|
305
|
+
export PATH=$PATH:/usr/libexec
|
306
|
+
|
307
|
+
# Test whether two bundle identifiers match
|
308
|
+
# The first one may contain the wildcard character '*', in which case pattern matching will be used unless the third parameter is "STRICT"
|
309
|
+
function does_bundle_id_match {
|
310
|
+
|
311
|
+
if [[ "$1" == "$2" ]]; then
|
312
|
+
return 0
|
313
|
+
elif [[ "$3" != STRICT && "$1" =~ \* ]]; then
|
314
|
+
local PATTERN0="${1//\./\\.}" # com.example.* -> com\.example\.*
|
315
|
+
local PATTERN1="${PATTERN0//\*/.*}" # com\.example\.* -> com\.example\..*
|
316
|
+
if [[ "$2" =~ ^$PATTERN1$ ]]; then
|
317
|
+
return 0
|
318
|
+
fi
|
319
|
+
fi
|
320
|
+
|
321
|
+
return 1
|
322
|
+
}
|
323
|
+
|
324
|
+
# Find the provisioning profile for a given bundle identifier
|
325
|
+
function provision_for_bundle_id {
|
326
|
+
|
327
|
+
for ARG in "${PROVISIONS_BY_ID[@]}"; do
|
328
|
+
if does_bundle_id_match "${ARG%%=*}" "$1" "$2"; then
|
329
|
+
echo "${ARG#*=}"
|
330
|
+
break
|
331
|
+
fi
|
332
|
+
done
|
333
|
+
}
|
334
|
+
|
335
|
+
# Find the bundle identifier contained inside a provisioning profile
|
336
|
+
function bundle_id_for_provison {
|
337
|
+
|
338
|
+
local FULL_BUNDLE_ID=`PlistBuddy -c 'Print :Entitlements:application-identifier' /dev/stdin <<< $(security cms -D -i "$1")`
|
339
|
+
checkStatus
|
340
|
+
echo "${FULL_BUNDLE_ID#*.}"
|
341
|
+
}
|
342
|
+
|
343
|
+
# Add given provisioning profile and bundle identifier to the search list
|
344
|
+
function add_provision_for_bundle_id {
|
345
|
+
|
346
|
+
local PROVISION="$1"
|
347
|
+
local BUNDLE_ID="$2"
|
348
|
+
|
349
|
+
local CURRENT_PROVISION=`provision_for_bundle_id "$BUNDLE_ID" STRICT`
|
350
|
+
|
351
|
+
if [[ "$CURRENT_PROVISION" != "" && "$CURRENT_PROVISION" != "$PROVISION" ]]; then
|
352
|
+
error "Conflicting provisioning profiles '$PROVISION' and '$CURRENT_PROVISION' for bundle identifier '$BUNDLE_ID'."
|
353
|
+
fi
|
354
|
+
|
355
|
+
PROVISIONS_BY_ID+=("$BUNDLE_ID=$PROVISION")
|
356
|
+
}
|
357
|
+
|
358
|
+
# Add given provisioning profile to the search list
|
359
|
+
function add_provision {
|
360
|
+
|
361
|
+
local PROVISION="$1"
|
362
|
+
|
363
|
+
if [[ "$1" =~ .+=.+ ]]; then
|
364
|
+
PROVISION="${1#*=}"
|
365
|
+
add_provision_for_bundle_id "$PROVISION" "${1%%=*}"
|
366
|
+
elif [[ "$DEFAULT_PROVISION" == "" ]]; then
|
367
|
+
DEFAULT_PROVISION="$PROVISION"
|
368
|
+
fi
|
369
|
+
|
370
|
+
if [[ ! -e "$PROVISION" ]]; then
|
371
|
+
error "Provisioning profile '$PROVISION' file does not exist"
|
372
|
+
fi
|
373
|
+
|
374
|
+
local BUNDLE_ID=`bundle_id_for_provison "$PROVISION"`
|
375
|
+
add_provision_for_bundle_id "$PROVISION" "$BUNDLE_ID"
|
376
|
+
}
|
377
|
+
|
378
|
+
# Load bundle identifiers from provisioning profiles
|
379
|
+
for ARG in "${RAW_PROVISIONS[@]}"; do
|
380
|
+
add_provision "$ARG"
|
381
|
+
done
|
382
|
+
|
383
|
+
# Resign the given application
|
384
|
+
function resign {
|
385
|
+
|
386
|
+
local APP_PATH="$1"
|
387
|
+
local NESTED="$2"
|
388
|
+
local BUNDLE_IDENTIFIER="$BUNDLE_IDENTIFIER"
|
389
|
+
local NEW_PROVISION="$NEW_PROVISION"
|
390
|
+
local APP_IDENTIFIER_PREFIX=""
|
391
|
+
local TEAM_IDENTIFIER=""
|
392
|
+
|
393
|
+
if [[ "$NESTED" == NESTED ]]; then
|
394
|
+
# Ignore bundle identifier for nested applications
|
395
|
+
BUNDLE_IDENTIFIER=""
|
396
|
+
fi
|
397
|
+
|
398
|
+
# Make sure that the Info.plist file is where we expect it
|
399
|
+
if [ ! -e "$APP_PATH/Info.plist" ];
|
400
|
+
then
|
401
|
+
error "Expected file does not exist: '$APP_PATH/Info.plist'"
|
402
|
+
fi
|
403
|
+
|
404
|
+
# Make a copy of old Info.plist, it will come handy later to extract some old values
|
405
|
+
cp -f "$APP_PATH/Info.plist" "$TEMP_DIR/oldInfo.plist"
|
406
|
+
|
407
|
+
# Read in current values from the app
|
408
|
+
local CURRENT_NAME=`PlistBuddy -c "Print :CFBundleDisplayName" "$APP_PATH/Info.plist"`
|
409
|
+
local CURRENT_BUNDLE_IDENTIFIER=`PlistBuddy -c "Print :CFBundleIdentifier" "$APP_PATH/Info.plist"`
|
410
|
+
local NEW_PROVISION=`provision_for_bundle_id "${BUNDLE_IDENTIFIER:-$CURRENT_BUNDLE_IDENTIFIER}"`
|
411
|
+
|
412
|
+
if [[ "$NEW_PROVISION" == "" && "$NESTED" != NESTED ]]; then
|
413
|
+
NEW_PROVISION="$DEFAULT_PROVISION"
|
414
|
+
fi
|
415
|
+
|
416
|
+
if [[ "$NEW_PROVISION" == "" ]]; then
|
417
|
+
if [[ "$NESTED" == NESTED ]]; then
|
418
|
+
warning "No provisioning profile for nested application: '$APP_PATH' with bundle identifier '${BUNDLE_IDENTIFIER:-$CURRENT_BUNDLE_IDENTIFIER}'"
|
419
|
+
else
|
420
|
+
warning "No provisioning profile for application: '$APP_PATH' with bundle identifier '${BUNDLE_IDENTIFIER:-$CURRENT_BUNDLE_IDENTIFIER}'"
|
421
|
+
fi
|
422
|
+
error "Use the -p option (example: -p com.example.app=xxxx.mobileprovision)"
|
423
|
+
fi
|
424
|
+
|
425
|
+
local PROVISION_BUNDLE_IDENTIFIER=`bundle_id_for_provison "$NEW_PROVISION"`
|
426
|
+
|
427
|
+
# Use provisioning profile's bundle identifier
|
428
|
+
if [ "$BUNDLE_IDENTIFIER" == "" ]; then
|
429
|
+
if [[ "$PROVISION_BUNDLE_IDENTIFIER" =~ \* ]]; then
|
430
|
+
log "Bundle Identifier contains a *, using the current bundle identifier"
|
431
|
+
BUNDLE_IDENTIFIER="$CURRENT_BUNDLE_IDENTIFIER"
|
432
|
+
else
|
433
|
+
BUNDLE_IDENTIFIER="$PROVISION_BUNDLE_IDENTIFIER"
|
434
|
+
fi
|
435
|
+
fi
|
436
|
+
|
437
|
+
if ! does_bundle_id_match "$PROVISION_BUNDLE_IDENTIFIER" "$BUNDLE_IDENTIFIER"; then
|
438
|
+
error "Bundle Identifier '$PROVISION_BUNDLE_IDENTIFIER' in provisioning profile '$NEW_PROVISION' does not match the Bundle Identifier '$BUNDLE_IDENTIFIER' for application '$APP_PATH'."
|
439
|
+
fi
|
440
|
+
|
441
|
+
log "Current bundle identifier is: '$CURRENT_BUNDLE_IDENTIFIER'"
|
442
|
+
log "New bundle identifier will be: '$BUNDLE_IDENTIFIER'"
|
443
|
+
|
444
|
+
# Update the CFBundleDisplayName property in the Info.plist if a new name has been provided
|
445
|
+
if [ "${DISPLAY_NAME}" != "" ];
|
446
|
+
then
|
447
|
+
if [ "${DISPLAY_NAME}" != "${CURRENT_NAME}" ];
|
448
|
+
then
|
449
|
+
log "Changing display name from '$CURRENT_NAME' to '$DISPLAY_NAME'"
|
450
|
+
`PlistBuddy -c "Set :CFBundleDisplayName $DISPLAY_NAME" "$APP_PATH/Info.plist"`
|
451
|
+
fi
|
452
|
+
fi
|
453
|
+
|
454
|
+
# Replace the embedded mobile provisioning profile
|
455
|
+
log "Validating the new provisioning profile: $NEW_PROVISION"
|
456
|
+
security cms -D -i "$NEW_PROVISION" > "$TEMP_DIR/profile.plist"
|
457
|
+
checkStatus
|
458
|
+
|
459
|
+
APP_IDENTIFIER_PREFIX=`PlistBuddy -c "Print :Entitlements:application-identifier" "$TEMP_DIR/profile.plist" | grep -E '^[A-Z0-9]*' -o | tr -d '\n'`
|
460
|
+
if [ "$APP_IDENTIFIER_PREFIX" == "" ];
|
461
|
+
then
|
462
|
+
APP_IDENTIFIER_PREFIX=`PlistBuddy -c "Print :ApplicationIdentifierPrefix:0" "$TEMP_DIR/profile.plist"`
|
463
|
+
if [ "$APP_IDENTIFIER_PREFIX" == "" ];
|
464
|
+
then
|
465
|
+
error "Failed to extract any app identifier prefix from '$NEW_PROVISION'"
|
466
|
+
else
|
467
|
+
warning "WARNING: extracted an app identifier prefix '$APP_IDENTIFIER_PREFIX' from '$NEW_PROVISION', but it was not found in the profile's entitlements"
|
468
|
+
fi
|
469
|
+
else
|
470
|
+
log "Profile app identifier prefix is '$APP_IDENTIFIER_PREFIX'"
|
471
|
+
fi
|
472
|
+
|
473
|
+
# Set new app identifer prefix if such entry exists in plist file
|
474
|
+
PlistBuddy -c "Set :AppIdentifierPrefix $APP_IDENTIFIER_PREFIX." "$APP_PATH/Info.plist" 2>/dev/null
|
475
|
+
|
476
|
+
TEAM_IDENTIFIER=`PlistBuddy -c "Print :Entitlements:com.apple.developer.team-identifier" "$TEMP_DIR/profile.plist" | tr -d '\n'`
|
477
|
+
if [ "$TEAM_IDENTIFIER" == "" ];
|
478
|
+
then
|
479
|
+
TEAM_IDENTIFIER=`PlistBuddy -c "Print :TeamIdentifier:0" "$TEMP_DIR/profile.plist"`
|
480
|
+
if [ "$TEAM_IDENTIFIER" == "" ];
|
481
|
+
then
|
482
|
+
warning "Failed to extract team identifier from '$NEW_PROVISION', resigned ipa may fail on iOS 8 and higher"
|
483
|
+
else
|
484
|
+
warning "WARNING: extracted a team identifier '$TEAM_IDENTIFIER' from '$NEW_PROVISION', but it was not found in the profile's entitlements, resigned ipa may fail on iOS 8 and higher"
|
485
|
+
fi
|
486
|
+
else
|
487
|
+
log "Profile team identifier is '$TEAM_IDENTIFIER'"
|
488
|
+
fi
|
489
|
+
|
490
|
+
# Make a copy of old embedded provisioning profile for futher use
|
491
|
+
cp -f "$APP_PATH/embedded.mobileprovision" "$TEMP_DIR/old-embedded.mobileprovision"
|
492
|
+
|
493
|
+
# Replace embedded provisioning profile with new file
|
494
|
+
cp -f "$NEW_PROVISION" "$APP_PATH/embedded.mobileprovision"
|
495
|
+
|
496
|
+
#if the current bundle identifier is different from the new one in the provisioning profile, then change it.
|
497
|
+
if [ "$CURRENT_BUNDLE_IDENTIFIER" != "$BUNDLE_IDENTIFIER" ];
|
498
|
+
then
|
499
|
+
log "Updating the bundle identifier from '$CURRENT_BUNDLE_IDENTIFIER' to '$BUNDLE_IDENTIFIER'"
|
500
|
+
`PlistBuddy -c "Set :CFBundleIdentifier $BUNDLE_IDENTIFIER" "$APP_PATH/Info.plist"`
|
501
|
+
checkStatus
|
502
|
+
fi
|
503
|
+
|
504
|
+
# Update the version number properties in the Info.plist if a version number has been provided
|
505
|
+
if [ "$VERSION_NUMBER" != "" ];
|
506
|
+
then
|
507
|
+
CURRENT_VERSION_NUMBER=`PlistBuddy -c "Print :CFBundleVersion" "$APP_PATH/Info.plist"`
|
508
|
+
if [ "$VERSION_NUMBER" != "$CURRENT_VERSION_NUMBER" ];
|
509
|
+
then
|
510
|
+
log "Updating the version from '$CURRENT_VERSION_NUMBER' to '$VERSION_NUMBER'"
|
511
|
+
`PlistBuddy -c "Set :CFBundleVersion $VERSION_NUMBER" "$APP_PATH/Info.plist"`
|
512
|
+
`PlistBuddy -c "Set :CFBundleShortVersionString $VERSION_NUMBER" "$APP_PATH/Info.plist"`
|
513
|
+
fi
|
514
|
+
fi
|
515
|
+
|
516
|
+
# Update short version string in the Info.plist if provided
|
517
|
+
if [[ -n "$SHORT_VERSION" ]];
|
518
|
+
then
|
519
|
+
CURRENT_VALUE="$(PlistBuddy -c "Print :CFBundleShortVersionString" "$APP_PATH/Info.plist")"
|
520
|
+
# Even if the old value is same - just update, less code, less debugging
|
521
|
+
log "Updating the short version string (CFBundleShortVersionString) from '$CURRENT_VALUE' to '$SHORT_VERSION'"
|
522
|
+
PlistBuddy -c "Set :CFBundleShortVersionString $SHORT_VERSION" "$APP_PATH/Info.plist"
|
523
|
+
fi
|
524
|
+
|
525
|
+
# Update bundle version in the Info.plist if provided
|
526
|
+
if [[ -n "$BUNDLE_VERSION" ]];
|
527
|
+
then
|
528
|
+
CURRENT_VALUE="$(PlistBuddy -c "Print :CFBundleVersion" "$APP_PATH/Info.plist")"
|
529
|
+
# Even if the old value is same - just update, less code, less debugging
|
530
|
+
log "Updating the bundle version (CFBundleVersion) from '$CURRENT_VALUE' to '$BUNDLE_VERSION'"
|
531
|
+
PlistBuddy -c "Set :CFBundleVersion $BUNDLE_VERSION" "$APP_PATH/Info.plist"
|
532
|
+
fi
|
533
|
+
|
534
|
+
# Check for and resign any embedded frameworks (new feature for iOS 8 and above apps)
|
535
|
+
FRAMEWORKS_DIR="$APP_PATH/Frameworks"
|
536
|
+
if [ -d "$FRAMEWORKS_DIR" ];
|
537
|
+
then
|
538
|
+
if [ "$TEAM_IDENTIFIER" == "" ];
|
539
|
+
then
|
540
|
+
error "ERROR: embedded frameworks detected, re-signing iOS 8 (or higher) applications wihout a team identifier in the certificate/profile does not work"
|
541
|
+
fi
|
542
|
+
|
543
|
+
log "Resigning embedded frameworks using certificate: '$CERTIFICATE'"
|
544
|
+
for framework in "$FRAMEWORKS_DIR"/*
|
545
|
+
do
|
546
|
+
if [[ "$framework" == *.framework || "$framework" == *.dylib ]]
|
547
|
+
then
|
548
|
+
/usr/bin/codesign ${VERBOSE} ${KEYCHAIN_FLAG} -f -s "$CERTIFICATE" "$framework"
|
549
|
+
checkStatus
|
550
|
+
else
|
551
|
+
log "Ignoring non-framework: $framework"
|
552
|
+
fi
|
553
|
+
done
|
554
|
+
fi
|
555
|
+
|
556
|
+
# Check for and update bundle identifiers for extensions and associated nested apps
|
557
|
+
log "Fixing nested app and extension references"
|
558
|
+
for key in ${NESTED_APP_REFERENCE_KEYS[@]}; do
|
559
|
+
# Check if Info.plist has a reference to another app or extension
|
560
|
+
REF_BUNDLE_ID=`PlistBuddy -c "Print ${key}" "$APP_PATH/Info.plist" 2>/dev/null`
|
561
|
+
if [ -n "$REF_BUNDLE_ID" ];
|
562
|
+
then
|
563
|
+
# Found a reference bundle id, now get the corresponding provisioning profile for this bundle id
|
564
|
+
REF_PROVISION=`provision_for_bundle_id $REF_BUNDLE_ID`
|
565
|
+
# Map to the new bundle id
|
566
|
+
NEW_REF_BUNDLE_ID=`bundle_id_for_provison "$REF_PROVISION"`
|
567
|
+
# Change if not the same and if doesn't contain wildcard
|
568
|
+
if [[ "$REF_BUNDLE_ID" != "$NEW_REF_BUNDLE_ID" ]] && ! [[ "$NEW_REF_BUNDLE_ID" =~ \* ]];
|
569
|
+
then
|
570
|
+
log "Updating nested app or extension reference for ${key} key from ${REF_BUNDLE_ID} to ${NEW_REF_BUNDLE_ID}"
|
571
|
+
`PlistBuddy -c "Set ${key} $NEW_REF_BUNDLE_ID" "$APP_PATH/Info.plist"`
|
572
|
+
fi
|
573
|
+
fi
|
574
|
+
done
|
575
|
+
|
576
|
+
if [ "$ENTITLEMENTS" != "" ];
|
577
|
+
then
|
578
|
+
if [ -n "$APP_IDENTIFIER_PREFIX" ];
|
579
|
+
then
|
580
|
+
# sanity check the 'application-identifier' is present in the provided entitlements and matches the provisioning profile value
|
581
|
+
ENTITLEMENTS_APP_ID_PREFIX=`PlistBuddy -c "Print :application-identifier" "$ENTITLEMENTS" | grep -E '^[A-Z0-9]*' -o | tr -d '\n'`
|
582
|
+
if [ "$ENTITLEMENTS_APP_ID_PREFIX" == "" ];
|
583
|
+
then
|
584
|
+
error "Provided entitlements file is missing a value for the required 'application-identifier' key"
|
585
|
+
elif [ "$ENTITLEMENTS_APP_ID_PREFIX" != "$APP_IDENTIFIER_PREFIX" ];
|
586
|
+
then
|
587
|
+
error "Provided entitlements file's app identifier prefix value '$ENTITLEMENTS_APP_ID_PREFIX' does not match the provided provisioning profile's value '$APP_IDENTIFIER_PREFIX'"
|
588
|
+
fi
|
589
|
+
fi
|
590
|
+
|
591
|
+
if [ -n "$TEAM_IDENTIFIER" ];
|
592
|
+
then
|
593
|
+
# sanity check the 'com.apple.developer.team-identifier' is present in the provided entitlements and matches the provisioning profile value
|
594
|
+
ENTITLEMENTS_TEAM_IDENTIFIER=`PlistBuddy -c "Print :com.apple.developer.team-identifier" "$ENTITLEMENTS" | tr -d '\n'`
|
595
|
+
if [ "$ENTITLEMENTS_TEAM_IDENTIFIER" == "" ];
|
596
|
+
then
|
597
|
+
error "Provided entitlements file is missing a value for the required 'com.apple.developer.team-identifier' key"
|
598
|
+
elif [ "$ENTITLEMENTS_TEAM_IDENTIFIER" != "$TEAM_IDENTIFIER" ];
|
599
|
+
then
|
600
|
+
error "Provided entitlements file's 'com.apple.developer.team-identifier' '$ENTITLEMENTS_TEAM_IDENTIFIER' does not match the provided provisioning profile's value '$TEAM_IDENTIFIER'"
|
601
|
+
fi
|
602
|
+
fi
|
603
|
+
|
604
|
+
log "Resigning application using certificate: '$CERTIFICATE'"
|
605
|
+
log "and entitlements: $ENTITLEMENTS"
|
606
|
+
cp -f "$ENTITLEMENTS" "$APP_PATH/archived-expanded-entitlements.xcent"
|
607
|
+
/usr/bin/codesign ${VERBOSE} -f -s "$CERTIFICATE" --entitlements "$ENTITLEMENTS" "$APP_PATH"
|
608
|
+
checkStatus
|
609
|
+
elif [[ -n "${USE_APP_ENTITLEMENTS}" ]];
|
610
|
+
then
|
611
|
+
# Extract entitlements from provisioning profile and from the app binary
|
612
|
+
# then combine them together
|
613
|
+
|
614
|
+
log "Extracting entitlements from provisioning profile"
|
615
|
+
PROFILE_ENTITLEMENTS="$TEMP_DIR/profileEntitlements"
|
616
|
+
PlistBuddy -x -c "Print Entitlements" "$TEMP_DIR/profile.plist" > "$PROFILE_ENTITLEMENTS"
|
617
|
+
checkStatus
|
618
|
+
|
619
|
+
log "Extracting entitlements from the app"
|
620
|
+
APP_ENTITLEMENTS="$TEMP_DIR/appEntitlements"
|
621
|
+
/usr/bin/codesign -d --entitlements :"$APP_ENTITLEMENTS" "$APP_PATH"
|
622
|
+
checkStatus
|
623
|
+
|
624
|
+
log "\nApp entitlements for ${APP_PATH}:"
|
625
|
+
log "$(cat "$APP_ENTITLEMENTS")"
|
626
|
+
|
627
|
+
log "Patching profile entitlements with values from app entitlements"
|
628
|
+
PATCHED_ENTITLEMENTS="$TEMP_DIR/patchedEntitlements"
|
629
|
+
# Start with using what comes in provisioning profile entitlements before patching
|
630
|
+
cp -f "$PROFILE_ENTITLEMENTS" "$PATCHED_ENTITLEMENTS"
|
631
|
+
|
632
|
+
# Get the old and new app identifier (prefix)
|
633
|
+
APP_ID_KEY="application-identifier"
|
634
|
+
# Extract just the identifier from the value
|
635
|
+
# Use the fact that we are after some identifer, which is always at the start of the string
|
636
|
+
OLD_APP_ID=$(PlistBuddy -c "Print $APP_ID_KEY" "$APP_ENTITLEMENTS" | grep -E '^[A-Z0-9]*' -o | tr -d '\n')
|
637
|
+
NEW_APP_ID=$(PlistBuddy -c "Print $APP_ID_KEY" "$PROFILE_ENTITLEMENTS" | grep -E '^[A-Z0-9]*' -o | tr -d '\n')
|
638
|
+
|
639
|
+
# Get the old and the new team ID
|
640
|
+
# Old team ID is not part of app entitlements, have to get it from old embedded provisioning profile
|
641
|
+
security cms -D -i "$TEMP_DIR/old-embedded.mobileprovision" > "$TEMP_DIR/old-embedded-profile.plist"
|
642
|
+
OLD_TEAM_ID=$(PlistBuddy -c "Print :TeamIdentifier:0" "$TEMP_DIR/old-embedded-profile.plist")
|
643
|
+
# New team ID is part of profile entitlements
|
644
|
+
NEW_TEAM_ID=$(PlistBuddy -c "Print com.apple.developer.team-identifier" "$PROFILE_ENTITLEMENTS" | grep -E '^[A-Z0-9]*' -o | tr -d '\n')
|
645
|
+
|
646
|
+
# List of rules for transferring entitlements from app to profile plist
|
647
|
+
# The format for each enty is "KEY[|ID_TYPE]"
|
648
|
+
# Where KEY is the plist key, e.g. "keychain-access-groups"
|
649
|
+
# and ID_TYPE is optional part separated by '|' that specifies what value to patch:
|
650
|
+
# TEAM_ID - patch the TeamIdentifierPrefix
|
651
|
+
# APP_ID - patch the AppIdentifierPrefix
|
652
|
+
# Patching means replacing old value from app entitlements with new value from provisioning profile
|
653
|
+
# For example, for KEY=keychain-access-groups the ID_TYPE=APP_ID
|
654
|
+
# Which means that old app ID prefix in keychain-access-groups will be replaced with new app ID prefix
|
655
|
+
# There can be only one ID_TYPE specified
|
656
|
+
# If entitlements use more than one ID type for single entitlement, then this way of resigning will not work
|
657
|
+
# instead an entitlements file must be provided explicitly
|
658
|
+
ENTITLEMENTS_TRANSFER_RULES=("com.apple.developer.associated-domains" \
|
659
|
+
"com.apple.developer.healthkit" \
|
660
|
+
"com.apple.developer.homekit" \
|
661
|
+
"com.apple.developer.icloud-container-identifiers" \
|
662
|
+
"com.apple.developer.icloud-services" \
|
663
|
+
"com.apple.developer.in-app-payments" \
|
664
|
+
"com.apple.developer.networking.vpn.api" \
|
665
|
+
"com.apple.developer.ubiquity-container-identifiers" \
|
666
|
+
"com.apple.developer.ubiquity-kvstore-identifier|TEAM_ID" \
|
667
|
+
"com.apple.external-accessory.wireless-configuration" \
|
668
|
+
"com.apple.security.application-groups" \
|
669
|
+
"inter-app-audio" \
|
670
|
+
"keychain-access-groups|APP_ID")
|
671
|
+
|
672
|
+
# Loop over all the entitlement keys that need to be transferred from app entitlements
|
673
|
+
for RULE in ${ENTITLEMENTS_TRANSFER_RULES[@]}; do
|
674
|
+
KEY=$(echo $RULE | cut -d'|' -f1)
|
675
|
+
ID_TYPE=$(echo $RULE | cut -d'|' -f2)
|
676
|
+
|
677
|
+
# Get the entry from app's entitlements
|
678
|
+
# Read it with PlistBuddy as XML, then strip the header and <plist></plist> part
|
679
|
+
ENTITLEMENTS_VALUE="$(PlistBuddy -x -c "Print $KEY" "$APP_ENTITLEMENTS" 2>/dev/null | sed -e 's,.*<plist[^>]*>\(.*\)</plist>,\1,g')"
|
680
|
+
if [[ -z "$ENTITLEMENTS_VALUE" ]]; then
|
681
|
+
log "No value for '$KEY'"
|
682
|
+
continue
|
683
|
+
fi
|
684
|
+
|
685
|
+
log "App entitlements value for key '$KEY':"
|
686
|
+
log "$ENTITLEMENTS_VALUE"
|
687
|
+
|
688
|
+
# Remove the entry for current key from profisioning profile entitlements (if exists)
|
689
|
+
PlistBuddy -c "Delete $KEY" "$PATCHED_ENTITLEMENTS" 2>/dev/null
|
690
|
+
|
691
|
+
# Add new entry to patched entitlements
|
692
|
+
# plutil needs dots in the key path to be escaped (e.g. com\.apple\.security\.application-groups)
|
693
|
+
# otherwise it interprets they key path as nested keys
|
694
|
+
PLUTIL_KEY=`echo "$KEY" | sed 's/\./\\\\./g'`
|
695
|
+
plutil -insert "$PLUTIL_KEY" -xml "$ENTITLEMENTS_VALUE" "$PATCHED_ENTITLEMENTS"
|
696
|
+
|
697
|
+
# Patch the ID value if specified
|
698
|
+
if [[ "$ID_TYPE" == "APP_ID" ]]; then
|
699
|
+
# Replace old value with new value in patched entitlements
|
700
|
+
log "Replacing old app identifier prefix '$OLD_APP_ID' with new value '$NEW_APP_ID'"
|
701
|
+
sed -i .bak "s/$OLD_APP_ID/$NEW_APP_ID/g" "$PATCHED_ENTITLEMENTS"
|
702
|
+
elif [[ "$ID_TYPE" == "TEAM_ID" ]]; then
|
703
|
+
# Replace new team identifier with new value
|
704
|
+
log "Replacing old team ID '$OLD_TEAM_ID' with new team ID: '$NEW_TEAM_ID'"
|
705
|
+
sed -i .bak "s/$OLD_TEAM_ID/$NEW_TEAM_ID/g" "$PATCHED_ENTITLEMENTS"
|
706
|
+
else
|
707
|
+
continue
|
708
|
+
fi
|
709
|
+
done
|
710
|
+
|
711
|
+
# Replace old bundle ID with new bundle ID in patched entitlements
|
712
|
+
# Read old bundle ID from the old Info.plist which was saved for this purpose
|
713
|
+
OLD_BUNDLE_ID="$(PlistBuddy -c "Print :CFBundleIdentifier" "$TEMP_DIR/oldInfo.plist")"
|
714
|
+
NEW_BUNDLE_ID="$(bundle_id_for_provison "$NEW_PROVISION")"
|
715
|
+
log "Replacing old bundle ID '$OLD_BUNDLE_ID' with new bundle ID '$NEW_BUNDLE_ID' in patched entitlements"
|
716
|
+
sed -i .bak "s/$OLD_BUNDLE_ID/$NEW_BUNDLE_ID/g" "$PATCHED_ENTITLEMENTS"
|
717
|
+
|
718
|
+
log "Resigning application using certificate: '$CERTIFICATE'"
|
719
|
+
log "and patched entitlements:"
|
720
|
+
log "$(cat "$PATCHED_ENTITLEMENTS")"
|
721
|
+
cp -f "$PATCHED_ENTITLEMENTS" "$APP_PATH/archived-expanded-entitlements.xcent"
|
722
|
+
/usr/bin/codesign ${VERBOSE} -f -s "$CERTIFICATE" --entitlements "$PATCHED_ENTITLEMENTS" "$APP_PATH"
|
723
|
+
checkStatus
|
724
|
+
else
|
725
|
+
log "Extracting entitlements from provisioning profile"
|
726
|
+
PlistBuddy -x -c "Print Entitlements" "$TEMP_DIR/profile.plist" > "$TEMP_DIR/newEntitlements"
|
727
|
+
checkStatus
|
728
|
+
log "Resigning application using certificate: '$CERTIFICATE'"
|
729
|
+
log "and entitlements from provisioning profile: $NEW_PROVISION"
|
730
|
+
cp -- "$TEMP_DIR/newEntitlements" "$APP_PATH/archived-expanded-entitlements.xcent"
|
731
|
+
/usr/bin/codesign ${VERBOSE} ${KEYCHAIN_FLAG} -f -s "$CERTIFICATE" --entitlements "$TEMP_DIR/newEntitlements" "$APP_PATH"
|
732
|
+
checkStatus
|
733
|
+
fi
|
734
|
+
|
735
|
+
# Remove the temporary files if they were created before generating ipa
|
736
|
+
rm -f "$TEMP_DIR/newEntitlements"
|
737
|
+
rm -f "$PROFILE_ENTITLEMENTS"
|
738
|
+
rm -f "$APP_ENTITLEMENTS"
|
739
|
+
rm -f "$PATCHED_ENTITLEMENTS"
|
740
|
+
rm -f "$PATCHED_ENTITLEMENTS.bak"
|
741
|
+
rm -r "$TEMP_DIR/old-embedded-profile.plist"
|
742
|
+
rm -f "$TEMP_DIR/profile.plist"
|
743
|
+
rm -f "$TEMP_DIR/old-embedded.mobileprovision"
|
744
|
+
rm -f "$TEMP_DIR/oldInfo.plist"
|
745
|
+
}
|
746
|
+
|
747
|
+
# Sign nested applications and app extensions
|
748
|
+
while IFS= read -d '' -r app;
|
749
|
+
do
|
750
|
+
log "Resigning nested application: '$app'"
|
751
|
+
resign "$app" NESTED
|
752
|
+
done < <(find "$TEMP_DIR/Payload/$APP_NAME" -d -mindepth 1 \( -name "*.app" -or -name "*.appex" \) -print0)
|
753
|
+
|
754
|
+
# Resign the application
|
755
|
+
resign "$TEMP_DIR/Payload/$APP_NAME"
|
756
|
+
|
757
|
+
# Repackage quietly
|
758
|
+
log "Repackaging as $NEW_FILE"
|
759
|
+
|
760
|
+
# Zip up the contents of the "$TEMP_DIR" folder
|
761
|
+
# Navigate to the temporary directory (sending the output to null)
|
762
|
+
# Zip all the contents, saving the zip file in the above directory
|
763
|
+
# Navigate back to the orignating directory (sending the output to null)
|
764
|
+
pushd "$TEMP_DIR" > /dev/null
|
765
|
+
zip -qry "../$TEMP_DIR.ipa" *
|
766
|
+
popd > /dev/null
|
767
|
+
|
768
|
+
# Move the resulting ipa to the target destination
|
769
|
+
mv "$TEMP_DIR.ipa" "$NEW_FILE"
|
770
|
+
|
771
|
+
# Remove the temp directory
|
772
|
+
rm -rf "$TEMP_DIR"
|
773
|
+
|
774
|
+
log "Process complete"
|