lib/cocoapods-imy-bin/command/bin/auto.rb in cocoapods-imy-bin-0.3.1.3 vs lib/cocoapods-imy-bin/command/bin/auto.rb in cocoapods-imy-bin-0.3.1.21
- old
+ new
@@ -52,14 +52,17 @@
end
def run
@specification = Specification.from_file(@podspec)
+ unless @podspec
+ raise Informative, "未找到 podspec文件"
+ end
sources_sepc = 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
UI.puts exception
fail_push_specs << spec
@@ -70,11 +73,11 @@
fail_push_specs.uniq.each do |spec|
UI.warn "【#{spec.name} | #{spec.version}】组件spec push失败 ."
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|
auto_success += "#{spec.name} | #{spec.version}\n"
UI.warn "===【 #{spec.name} | #{spec.version} 】二进制组件制作完成 !!! "
@@ -121,15 +124,15 @@
end
if @env
argvs += ["--env=#{@env}"]
end
argvs += ["--configuration=#{@config}"]
-
+
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
def code_podsepc_extname
'.podsepc'
@@ -181,13 +184,13 @@
name = nil
Pathname.pwd.children.each do |child|
puts child
if File.file?(child)
if child.extname == '.podspec'
- name = File.basename(child)
- unless name.include?("binary-template")
- return name
- end
+ name = File.basename(child)
+ unless name.include?("binary-template")
+ return name
+ end
end
end
end
return name
end