Class: Pod::Command::Bin::BuildAll
- Inherits:
-
Pod::Command::Bin
- Object
- Pod::Command
- Pod::Command::Bin
- Pod::Command::Bin::BuildAll
- Includes:
- CBin::BuildAll
- Defined in:
- lib/cocoapods-mtxx-bin/command/bin/buildAll.rb
Constant Summary collapse
- CDN =
'https://cdn.cocoapods.org/'.freeze
- MASTER_HTTP =
'https://github.com/CocoaPods/Specs.git'.freeze
- MASTER_SSH =
'git@github.com:CocoaPods/Specs.git'.freeze
- MT_REPO =
'techgit.meitu.com'.freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ BuildAll
constructor
A new instance of BuildAll.
- #run ⇒ Object
Methods included from CBin::SpecFilesHelper
#binary_spec, #binary_spec_files, #binary_template_spec, #binary_template_spec_file, #binary_template_spec_files, #clear_binary_spec_file_if_needed, #code_spec, #code_spec_files, #create_binary_spec_file, #find_spec_file, #spec_files
Methods included from CBin::SourcesHelper
#binary_source, #code_source_list, #sources_manager, #sources_option, #valid_sources
Constructor Details
#initialize(argv) ⇒ BuildAll
Returns a new instance of BuildAll.
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/cocoapods-mtxx-bin/command/bin/buildAll.rb', line 36 def initialize(argv) @clean = argv.flag?('clean', false) @clean_single = argv.flag?('clean-single', false) @repo_update = argv.flag?('repo-update', false) @full_build = argv.flag?('full-build', false) @skip_simulator = argv.flag?('skip-simulator', false) @configuration = argv.option('configuration', 'Debug') @base_dir = "#{Pathname.pwd}/build_pods" @version_helper = BinHelper.new super end |
Class Method Details
.options ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/cocoapods-mtxx-bin/command/bin/buildAll.rb', line 25 def self. [ %w[--clean 全部二进制包制作完成后删除编译临时目录], %w[--clean-single 每制作完一个二进制包就删除该编译临时目录], %w[--repo-update 更新Podfile中指定的repo仓库], %w[--full-build 是否全量打包], %w[--skip-simulator 跳过模拟器编译], %w[--configuration=configName 在构建每个目标时使用configName指定构建配置,如:'Debug'、'Release'等] ].concat(super).uniq end |
Instance Method Details
#run ⇒ Object
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 |
# File 'lib/cocoapods-mtxx-bin/command/bin/buildAll.rb', line 48 def run CBin.config.config_file_exist? # 打印提示 print_tip # 开始时间 @start_time = Time.now.to_i # 读取配置文件 read_config # 更新repo仓库 repo_update # 执行pre_build命令 pre_build # 分析依赖 @analyze_result = analyse # 删除编译产物 clean_build_pods # 编译所有pod_targets results = build_pod_targets # 执行post_build命令 post_build(results) # 删除编译产物 clean_build_pods if @clean # 计算耗时 show_cost_time end |