Class: VPL::Command::Update::All

Inherits:
VPL::Command::Update show all
Defined in:
lib/vcpkg_pipeline/command/update/all.rb

Overview

VPL::Command::Update::All

Instance Attribute Summary

Attributes inherited from VPL::Command

#argv_extension

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from VPL::Command

ensure_not_root_or_allowed!, git_version, options_extension, options_extension_hash, run, verify_minimum_git_version!, verify_xcode_license_approved!

Constructor Details

#initialize(argv) ⇒ All

Returns a new instance of All.



27
28
29
30
31
32
33
# File 'lib/vcpkg_pipeline/command/update/all.rb', line 27

def initialize(argv)
  @path = argv.shift_argument || Dir.pwd

  @new_version = argv.option('version', '').split(',').first
  @output_path = argv.option('output', '').split(',').first
  super
end

Class Method Details

.optionsObject



20
21
22
23
24
25
# File 'lib/vcpkg_pipeline/command/update/all.rb', line 20

def self.options
  [
    ['--version=x.x.x', '新版本号。(默认使用patch+1)'],
    ['--output=./', '项目打包的输出目录。(默认使用项目 根目录/build)']
  ].concat(super)
end

Instance Method Details

#runObject



35
36
37
38
39
# File 'lib/vcpkg_pipeline/command/update/all.rb', line 35

def run
  updater = Updater.new(@path)

  updater.update_all(@new_version, @output_path)
end