Class: VPL::Command::Publish
- Inherits:
-
VPL::Command
- Object
- CLAide::Command
- VPL::Command
- VPL::Command::Publish
- Defined in:
- lib/vcpkg_pipeline/command/publish.rb
Overview
VPL::Command::Publish
Instance Attribute Summary
Attributes inherited from VPL::Command
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Publish
constructor
A new instance of Publish.
- #run ⇒ Object
Methods inherited from VPL::Command
ensure_not_root_or_allowed!, git_version, options_extension, run, verify_minimum_git_version!, verify_xcode_license_approved!
Constructor Details
#initialize(argv) ⇒ Publish
Returns a new instance of Publish.
34 35 36 37 38 39 |
# File 'lib/vcpkg_pipeline/command/publish.rb', line 34 def initialize(argv) @path = argv.shift_argument || Dir.pwd @registry = argv.option('registry', '').split(',').first super end |
Class Method Details
.options ⇒ Object
22 23 24 25 26 |
# File 'lib/vcpkg_pipeline/command/publish.rb', line 22 def self. [ ['--registry=.', '指定vcpkg的registry目录, 不可为空'] ].concat(super).concat() end |
.options_extension_hash ⇒ Object
28 29 30 31 32 |
# File 'lib/vcpkg_pipeline/command/publish.rb', line 28 def self. Hash[ 'update' => Update::All., ] end |
Instance Method Details
#run ⇒ Object
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/vcpkg_pipeline/command/publish.rb', line 41 def run VPL.error("registry目录异常: #{@registry}") unless File.directory? @registry Update::All.run([@path] + argv_extension['update']) scanner = Scanner.new(@path) vcpkg = VCPkg.open(@registry) vcpkg.publish(scanner.vcport) end |