Class: Pindo::Command::Deploy::Configproj
- Inherits:
-
Pindo::Command::Deploy
- Object
- CLAide::Command
- Pindo::Command
- Pindo::Command::Deploy
- Pindo::Command::Deploy::Configproj
- Includes:
- Pindo::Command::DeployOptions, SwarkHelper, XcodeAppConfig, XcodeBuildHelper, XcodeCertHelper
- Defined in:
- lib/pindo/command/deploy/configproj.rb
Constant Summary
Constants inherited from Pindo::Command
Pindo::Command::DEFAULT_OPTIONS, Pindo::Command::DEFAULT_ROOT_OPTIONS
Instance Attribute Summary
Attributes included from Pindo::Command::DeployOptions
#additional_args, #apple_id, #args_adhoc_flag, #args_appconfig, #args_appconfig_dir, #args_appconfig_fullname, #args_apple_id, #args_appstore_flag, #args_array, #args_bundle_id, #args_dev_flag, #args_macos_flag, #args_repo_name, #argv_temp, #bundle_id, #bundle_id_extension, #bundle_id_extensionad, #bundle_id_extensionporn, #bundle_id_imessage, #bundle_id_keyboard, #bundle_id_pushcontent, #bundle_id_pushservice, #bundle_id_siri, #bundle_id_siriui, #bundle_id_watchapp, #bundle_id_watchapp_extension, #bundle_id_widget, #config_json, #deploy_acount_id, #deploy_group_id, #deploy_icloud_id, #deploy_identifier, #deploy_identifier_extension, #deploy_identifier_extensionad, #deploy_identifier_extensionporn, #deploy_identifier_imessage, #deploy_identifier_keyboard, #deploy_identifier_pushcontent, #deploy_identifier_pushservice, #deploy_identifier_siri, #deploy_identifier_siriui, #deploy_identifier_watchapp, #deploy_identifier_watchapp_extension, #deploy_identifier_widget, #deploy_repo_name, #group_id, #icloud_id, #newconfuse_flag, #oldconfuse_flag
Attributes inherited from Pindo::Command
Instance Method Summary collapse
Methods included from SwarkHelper
#add_swark_authorize_json, #add_swark_entitlement, #check_swark_authorize, #show_swark_authorize_error
Methods included from XcodeCertHelper
#config_infoplist_cert, #config_project_cert, #create_provisioning_info_array, #create_upload_cert_info, #create_upload_provisioning_info, #get_target_name_map, #modify_entitlements_plist, #modify_info_plist_icloud
Methods included from XcodeAppConfig
#add_pod_modue, #add_project_modue, #auto_increase_buildnumber, #find_group, #modify_appprefix_plist, #remove_test_pod_modue
Methods included from XcodeBuildHelper
#backup_podfile_lock, #install_google_plist, #modify_info_plist, #modify_infoplist_version, #modify_maintarget_info_plist, #modify_project_config, #pull_podfile_lock
Methods included from Pindo::Command::DeployOptions
#check_config_version, #get_build_type_args, #get_bundle_id_map, #get_confuse_type_args, #init_deploy_params, #init_develop_params, #initialize, options, #print_params_info, #validate!
Methods inherited from Pindo::Command
#initialize, options, run, #validate!
Methods included from Funlog::Mixin
Methods included from Pindoconfig::Mixin
Methods included from Githelper
#add_branch, #add_tag, #add_tag_with_check, #clone_clang_repo, #clone_devclang_repo, #clone_pindo_common_config_repo, #clone_pindo_env_config_repo, #clong_buildconfig_repo, #get_repo_base_name, #getcode_to_dir, #git_addpush_repo, #git_latest_commit_id, #local_branch_exists?, #local_tag_exists?, #prepare_gitenv, #process_need_add_files, #remote_branch_exists?, #remote_tag_exists?, #remove_branch, #remove_tag
Methods included from Executable
capture_command, #executable, execute_command, which, which!
Instance Method Details
#run ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/pindo/command/deploy/configproj.rb', line 33 def run check_config_version current_dir = Dir.pwd app_config_dir = clong_buildconfig_repo(repo_name: @deploy_repo_name) project_fullname = Dir.glob(File.join(current_dir, "/*.xcodeproj")).max_by {|f| File.mtime(f)} if project_fullname.nil? || !File.exist?(project_fullname) then raise "找到多个.xcodeproj文件,请检查" end @proj_name = File.basename(project_fullname, ".xcodeproj") Funlog.instance.("正在替换google-info.plist...") google_info_config_dir = clong_buildconfig_repo(repo_name: @bundle_id) install_google_plist(project_dir:current_dir, app_config_dir:google_info_config_dir) Funlog.instance.("替换google-info.plist完成!") icon_name = File.join(app_config_dir,"fastlane","icon.png") time = Time.now.strftime('%m%d-%H%M%S') new_icon_dir = File.join(current_dir, "icon_"+time) Funlog.instance.("正在创建icon...") XcodeResHelper.create_icons(icon_name: icon_name, new_icon_dir: new_icon_dir) Funlog.instance.("创建icon完成!") Funlog.instance.("正在替换icon...") XcodeResHelper.install_icon(proj_dir: current_dir, new_icon_dir: new_icon_dir) Funlog.instance.("替换icon完成!") begin FileUtils.rm_rf(new_icon_dir) rescue StandardError => err end Funlog.instance.("正在替换启动页...") launchimg_pub_path = File.join(app_config_dir,"launch") XcodeResHelper.install_launchimg(proj_dir:current_dir, launchimg_pub_path:launchimg_pub_path) Funlog.instance.("启动页处理完成!") add_project_modue(project_dir:current_dir, proj_name:@proj_name, config_json:@config_json) Funlog.instance.("正在修改工程配置...") modify_info_plist(project_dir:current_dir, proj_name:@proj_name, config_json:@config_json) modify_project_config(project_dir:current_dir, proj_name:@proj_name, config_json:@config_json) appprefix_file = "AppPrefix.plist" if @config_json && @config_json['project_info']['appprefix_plist'] then appprefix_file = @config_json['project_info']['appprefix_plist'] end modify_appprefix_plist(project_dir:current_dir, appprefix_file:appprefix_file, config_json:@config_json) Funlog.instance.("工程配置修改完成!") (config_json:@config_json) end |