Class: DYAutomate::Command::WorkSpace::Update
- Inherits:
-
DYAutomate::Command::WorkSpace
- Object
- CLAide::Command
- DYAutomate::Command
- DYAutomate::Command::WorkSpace
- DYAutomate::Command::WorkSpace::Update
- Defined in:
- lib/DYAutomate/Command/Workspace/update.rb
Instance Attribute Summary
Attributes inherited from DYAutomate::Command::WorkSpace
#name, #path, #project_path, #workSpace_path
Instance Method Summary collapse
- #do_install ⇒ Object
-
#initialize(argv) ⇒ Update
constructor
#要查询的lib名字 attr_accessor :name #查询结果lib信息 attr_accessor :info.
- #run ⇒ Object
- #validate! ⇒ Object
Methods inherited from DYAutomate::Command::WorkSpace
#dy_update_repo, #existProject?, #existWorkSpace?
Methods inherited from DYAutomate::Command
Constructor Details
#initialize(argv) ⇒ Update
#要查询的lib名字attr_accessor :name #查询结果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 Method Details
#do_install ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/DYAutomate/Command/Workspace/update.rb', line 44 def do_install # system "rm -rf Podfile.lock" # system "rm -rf Pods/*" isOk = system "pod update --no-repo-update" if isOk pp("pod install 成功",1) else pp("pod install 失败",1) end system "sleep 3" system "open *.xcworkspace" end |
#run ⇒ Object
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 |