Class: KnifeSpork::SporkBump
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- KnifeSpork::SporkBump
- Defined in:
- lib/chef/knife/spork-bump.rb
Constant Summary collapse
- TYPE_INDEX =
{ :major => 0, :minor => 1, :patch => 2, :manual => 3 }.freeze
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/chef/knife/spork-bump.rb', line 34 def run self.class.send(:include, KnifeSpork::Runner) self.config = Chef::Config.merge!(config) config[:cookbook_path] ||= Chef::Config[:cookbook_path] if @name_args.empty? show_usage ui.error("You must specify at least a cookbook name") exit 1 end # Temporary fix for #138 to allow Berkshelf functionality # to be bypassed until #85 has been completed and Berkshelf 3 support added unload_berkshelf_if_specified #First load so plugins etc know what to work with @cookbook = load_cookbook(name_args.first) run_plugins(:before_bump) #Reload cookbook in case a VCS plugin found updates @cookbook = load_cookbook(name_args.first) bump run_plugins(:after_bump) end |