Class: DYAutomate::Command::WorkSpace::Update

Inherits:
DYAutomate::Command::WorkSpace show all
Defined in:
lib/DYAutomate/Command/Workspace/update.rb

Instance Attribute Summary collapse

Attributes inherited from DYAutomate::Command::WorkSpace

#isSilent, #name, #path, #project_path, #workSpace_path

Attributes inherited from DYAutomate::Command

#config, #env_str, #repo_name

Instance Method Summary collapse

Methods inherited from DYAutomate::Command::WorkSpace

#dy_update_repo, #existProject?, #existWorkSpace?, options

Methods inherited from DYAutomate::Command

#pp

Constructor Details

#initialize(argv) ⇒ Update

#查询结果lib信息 attr_accessor :info



21
22
23
24
# File 'lib/DYAutomate/Command/Workspace/update.rb', line 21

def initialize(argv)
  # @name = argv.shift_argument
  super
end

Instance Attribute Details

#quietObject

#要查询的lib名字



17
18
19
# File 'lib/DYAutomate/Command/Workspace/update.rb', line 17

def quiet
  @quiet
end

Instance Method Details

#do_installObject



44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/DYAutomate/Command/Workspace/update.rb', line 44

def do_install
  isOk = system "#{@env_str} pod update --no-repo-update"
  if isOk
    pp("pod update 成功",1)
  else
    pp("pod update 失败",1)
  end
  
  unless @isSilent
    system "sleep 3"
    system "open *.xcworkspace"
  end

end

#runObject



37
38
39
40
41
42
# File 'lib/DYAutomate/Command/Workspace/update.rb', line 37

def run
  pp('pod WorkSpace update run  ...',1)
  Dir.chdir(@path)
  dy_update_repo
  do_install
end

#validate!Object



26
27
28
29
30
31
32
33
34
35
# File 'lib/DYAutomate/Command/Workspace/update.rb', line 26

def validate!
  super
  # unless @name
  #   help! 'need the lib `NAME`.'
  # end

  # unless existAtPools?
  #   help! "the podspec file is not exist at #{Dir.pwd}."
  # end
end