Class: Chef::Knife::Changelog

Inherits:
Chef::Knife show all
Defined in:
lib/chef/knife/changelog.rb

Instance Method Summary collapse

Instance Method Details

#runObject



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/chef/knife/changelog.rb', line 66

def run
  Log.info config.to_s
  if config[:policyfile] && File.exist?(config[:policyfile])
    puts PolicyChangelog.new(
      @name_args,
      config[:policyfile],
      config[:with_dependencies]
    ).generate_changelog
  else
    berksfile = Berkshelf::Berksfile.from_options({})
    puts KnifeChangelog::Changelog::Berksfile
      .new(berksfile, config)
      .run(@name_args)
  end
end