lib/cocoapods-tdfire-binary/command/assemble.rb in cocoapods-tdfire-binary-1.0.9 vs lib/cocoapods-tdfire-binary/command/assemble.rb in cocoapods-tdfire-binary-1.0.10
- old
+ new
@@ -18,13 +18,37 @@
super
help! "当前目录下找不到有效的 podspec 文件" if first_podspec.nil?
end
def run
- run_command Package, ['--clean']
- run_command Lint
- run_command Push
- run_command Publish
+ # 每条命令要重开一个上下文
+
+ run_commands [
+ 'pod binary package --clean',
+ 'pod binary lint',
+ 'pod binary push',
+ 'pod binary publish'
+ ]
+ #
+ # system 'pod binary package --clean'
+ # system 'pod binary lint'
+ # system 'pod binary push'
+ # system 'pod binary publish'
+
+ # the sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
+ # lint 和 publish 的时候,都会出现这个问题
+ #
+ # run_command Package, ['--clean']
+ # run_command Lint
+ # run_command Push
+ # run_command Publish
+ end
+
+ def run_commands(commands)
+ commands.each do |c|
+ system c
+ break if $?.exitstatus != 0
+ end
end
def run_command(command_class, argv = [])
lint = command_class::new(CLAide::ARGV.new(argv))
lint.validate!
\ No newline at end of file