Sha256: d9e1b2f9370ba92ad0e9858e64e66166b9d01660bb1f58e6bffa8ffba19ccacb

Contents?: true

Size: 1.44 KB

Versions: 28

Compression:

Stored size: 1.44 KB

Contents

require "knife/changelog/version"
require "knife/changelog/changelog"
require "berkshelf"
require 'chef/knife'
require 'mixlib/shellout'

class Chef
  class Knife
    class Changelog < Knife

      banner 'knife changelog COOKBOOK [COOKBOOK ...]'

      def initialize(options)
        super
        berksfile = Berkshelf::Berksfile.from_options({})
        @changelog = KnifeChangelog::Changelog.new(berksfile.lockfile.locks, config, berksfile.sources)
      end

      option :linkify,
        :short => '-l',
        :long  => '--linkify',
        :description => 'add markdown links where relevant',
        :boolean => true

      option :markdown,
        :short => '-m',
        :long  => '--markdown',
        :description => 'use markdown syntax',
        :boolean => true

      option :ignore_changelog_file,
        :long => '--ignore-changelog-file',
        :description => "Ignore changelog file presence, use git history instead",
        :boolean => true

      option :allow_update_all,
        :long => '--allow-update-all',
        :description => "If no cookbook given, check all Berksfile",
        :boolean => true,
        :default => true

      option :submodules,
        :long => '--submodules SUBMODULE[,SUBMODULE]',
        :description => 'Submoduless to check for changes as well (comma separated)'


      def run
        Log.info config
        changelog = @changelog.run(@name_args)
        puts changelog
      end
    end

  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
knife-changelog-0.5.18 lib/chef/knife/changelog.rb
knife-changelog-0.5.17 lib/chef/knife/changelog.rb
knife-changelog-0.5.16 lib/chef/knife/changelog.rb
knife-changelog-0.5.15 lib/chef/knife/changelog.rb
knife-changelog-0.5.14 lib/chef/knife/changelog.rb
knife-changelog-0.5.13 lib/chef/knife/changelog.rb
knife-changelog-0.5.12 lib/chef/knife/changelog.rb
knife-changelog-0.5.11 lib/chef/knife/changelog.rb
knife-changelog-0.5.10.pre.alpha.pre.78 lib/chef/knife/changelog.rb
knife-changelog-0.5.9.pre.alpha.pre.76 lib/chef/knife/changelog.rb
knife-changelog-0.5.8.pre.alpha.pre.71 lib/chef/knife/changelog.rb
knife-changelog-0.5.8 lib/chef/knife/changelog.rb
knife-changelog-0.5.7 lib/chef/knife/changelog.rb
knife-changelog-0.5.6 lib/chef/knife/changelog.rb
knife-changelog-0.5.6.pre.alpha.pre.67 lib/chef/knife/changelog.rb
knife-changelog-0.5.5.pre.alpha.pre.64 lib/chef/knife/changelog.rb
knife-changelog-0.5.5 lib/chef/knife/changelog.rb
knife-changelog-0.5.4 lib/chef/knife/changelog.rb
knife-changelog-0.5.4.pre.alpha.pre.62 lib/chef/knife/changelog.rb
knife-changelog-0.5.3.pre.alpha.pre.55 lib/chef/knife/changelog.rb