From fb2747bafb2dd902aec6cb2b67f89fd4039f9744 Mon Sep 17 00:00:00 2001 From: dabing1022 Date: Tue, 12 Jan 2021 15:58:36 +0800 Subject: [PATCH] fix: root spec in white pod list report push failure --- .../cocoapods-imy-bin/command/bin/archive.rb | 22 ++++++++++--------- .../lib/cocoapods-imy-bin/command/bin/auto.rb | 10 ++++----- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/archive.rb b/cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/archive.rb index 5bd9181..3e652a6 100755 --- a/cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/archive.rb +++ b/cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/archive.rb @@ -69,16 +69,15 @@ def run @spec = Specification.from_file(spec_file) generate_project - build_root_spec + source_specs = Array.new + source_specs.concat(build_root_spec) + source_specs.concat(build_dependencies) if @all_make - sources_sepc = Array.new - sources_sepc << @spec - sources_sepc.concat(build_dependencies) if @all_make - - sources_sepc + source_specs end def build_root_spec + source_specs = [] builder = CBin::Build::Helper.new(@spec, @platform, @framework_output, @@ -88,12 +87,15 @@ def build_root_spec @config) builder.build builder.clean_workspace if @clean && !@all_make + source_specs << @spec unless CBin::Config::Builder.instance.white_pod_list.include?(@spec.name) + + source_specs end def build_dependencies @build_finshed = true #如果没要求,就清空依赖库数据 - sources_sepc = [] + source_specs = [] @@missing_binary_specs.uniq.each do |spec| next if spec.name.include?('/') next if spec.name == @spec.name @@ -113,11 +115,11 @@ def build_dependencies next if spec.attributes_hash['vendored_frameworks'] && @spec.name != spec.name #过滤带有vendored_frameworks的 next if spec.attributes_hash['ios.vendored_frameworks'] && @spec.name != spec.name #过滤带有vendored_frameworks的 #获取没有制作二进制版本的spec集合 - sources_sepc << spec + source_specs << spec end fail_build_specs = [] - sources_sepc.uniq.each do |spec| + source_specs.uniq.each do |spec| begin builder = CBin::Build::Helper.new(spec, @platform, @@ -138,7 +140,7 @@ def build_dependencies UI.warn "【#{spec.name} | #{spec.version}】组件二进制版本编译失败 ." end end - sources_sepc - fail_build_specs + source_specs - fail_build_specs end # 解析器传过来的 diff --git a/cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/auto.rb b/cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/auto.rb index d6bc2ab..c994391 100755 --- a/cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/auto.rb +++ b/cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/auto.rb @@ -54,10 +54,10 @@ def validate! def run @specification = Specification.from_file(@podspec) - sources_sepc = run_archive + source_specs = run_archive fail_push_specs = [] - sources_sepc.uniq.each do |spec| + source_specs.uniq.each do |spec| begin fail_push_specs << spec unless CBin::Upload::Helper.new(spec,@code_dependencies,@sources).upload rescue Object => exception @@ -72,7 +72,7 @@ def run end end - success_specs = sources_sepc - fail_push_specs + success_specs = source_specs - fail_push_specs if success_specs.any? auto_success = "" success_specs.uniq.each do |spec| @@ -126,8 +126,8 @@ def run_archive archive = Pod::Command::Bin::Archive.new(CLAide::ARGV.new(argvs)) archive.validate! - sources_sepc = archive.run - sources_sepc + source_specs = archive.run + source_specs end