diff --git a/.gitignore b/.gitignore index e69de29..af56f61 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +.idea/ 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 281f834..eec13d2 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 @@ -46,11 +46,14 @@ def initialize(argv) super end + def validate! + help! "未找到 podspec文件" unless @podspec + super + end + def run + @specification = Specification.from_file(@podspec) - unless @podspec - raise Informative, "未找到 podspec文件" - end sources_sepc = run_archive fail_push_specs = [] @@ -175,6 +178,7 @@ def spec_file #Dir.glob 可替代 def find_podspec + name = nil Pathname.pwd.children.each do |child| puts child if File.file?(child) @@ -185,6 +189,7 @@ def find_podspec end end end + return name end end