Class: Pod::Command::Stable::Update

Inherits:
Pod::Command::Stable show all
Defined in:
lib/cocoapods-bb-PodAssistant/command/stable/update.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Pod::Command::Stable

#validate!

Constructor Details

#initialize(argv) ⇒ Update

Returns a new instance of Update.



28
29
30
31
32
# File 'lib/cocoapods-bb-PodAssistant/command/stable/update.rb', line 28

def initialize(argv)
  @pods = argv.arguments!
  super

end

Class Method Details

.optionsObject



22
23
24
25
26
# File 'lib/cocoapods-bb-PodAssistant/command/stable/update.rb', line 22

def self.options
  [
    # ['--business-spec=specName', '业务线公共stable spec名称'],
  ].concat(super)
end

Instance Method Details

#runObject



34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/cocoapods-bb-PodAssistant/command/stable/update.rb', line 34

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