Class: Bourdain::Commands::BumpCommand
- Defined in:
- lib/bourdain/resources/commands/bump.rb
Instance Attribute Summary
Attributes inherited from Resource
#opts, #raw_usage, #resource_name, #spec, #status
Instance Method Summary collapse
-
#initialize(argv) ⇒ BumpCommand
constructor
A new instance of BumpCommand.
Methods inherited from Resource
log=, raw_usage, resource_name, usage
Constructor Details
#initialize(argv) ⇒ BumpCommand
Returns a new instance of BumpCommand.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/bourdain/resources/commands/bump.rb', line 10 def initialize argv super version_spec = argv.shift version_spec = 'patch' if version_spec.nil? verify! version_spec return unless require_versionfile! current_version = get_cookbook_version new_version = bump_version version_spec, current_version set_cookbook_version new_version log.info "Bumped to #{new_version}." end |