From 74dc62e10d00fe5efc9fbf218d7d9d41279c56b8 Mon Sep 17 00:00:00 2001 From: zhaoweibing Date: Mon, 11 Jan 2021 19:43:46 +0800 Subject: [PATCH 1/2] fix: Issue #79 --- .gitignore | 2 ++ .../lib/cocoapods-imy-bin/command/bin/auto.rb | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) 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 From a9beacb0182fb1ba926a21e7329f1bd198aaa006 Mon Sep 17 00:00:00 2001 From: zhaoweibing Date: Mon, 11 Jan 2021 21:07:48 +0800 Subject: [PATCH 2/2] fix: return logic error --- cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/auto.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 eec13d2..d6bc2ab 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 @@ -189,8 +189,8 @@ def find_podspec end end end - return name end + return name end end