Class: VPL::Command::Update::Spec

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

Overview

VPL::Command::Update::Spec

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) ⇒ Spec

Returns a new instance of Spec.



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

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

  super
end

Class Method Details

.optionsObject



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

def self.options
  [
    ['--version=x.x.x', '新版本号。(默认使用patch+1)']
  ].concat(super)
end

Instance Method Details

#runObject



33
34
35
36
37
# File 'lib/vcpkg_pipeline/command/update/spec.rb', line 33

def run
  updater = Updater.new(@path)

  updater.update_spec
end