require 'cocoapods-bb-PodAssistant/config/source_manager' module Pod class Command class Stable < Command class Update < Stable self.summary = '[命令同执行`pod update操作`] Update outdated project dependencies and create new ' \ 'Podfile.lock' self.description = <<-DESC Updates the Pods identified by the specified `POD_NAMES`, which is a space-delimited list of pod names. If no `POD_NAMES` are specified, it updates all the Pods, ignoring the contents of the Podfile.lock. This command is reserved for the update of dependencies; pod install should be used to install changes to the Podfile. DESC self.arguments = [ CLAide::Argument.new('POD_NAMES', false, true), ] def self.options [ # ['--business-spec=specName', '业务线公共stable spec名称'], ].concat(super) end def initialize(argv) @pods = argv.arguments! super end def run puts "[PodAssistant] 开始执行 $ pod stable update".yellow # verify_podfile_exists! # 系统提供api验证podfile是否ok if @pods.any? pods_str = @pods.join(" ") system "pod update #{pods_str}" else system "pod update" end source_manager = BB::SourceManager.new() source_manager.update_local_stable_from_podmodules(@pods) puts "[PodAssistant] `pod stable update` complete!".green end end end end end