Skip to content

Commit

Permalink
Merge pull request #85 from dabing1022/fix_white_pod_failure_report
Browse files Browse the repository at this point in the history
Fix white pod failure report
  • Loading branch information
su350380433 authored Jan 12, 2021
2 parents 64e20f8 + fb2747b commit 9821178
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
22 changes: 12 additions & 10 deletions cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/archive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -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,
Expand All @@ -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

# 解析器传过来的
Expand Down
10 changes: 5 additions & 5 deletions cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/auto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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|
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit 9821178

Please sign in to comment.