Class: KnifeChangelog::GitSubmodule

Inherits:
Changelog
  • Object
show all
Defined in:
lib/knife/changelog/git_submodule.rb

Constant Summary

Constants inherited from Changelog

Changelog::GERRIT_REGEXP

Instance Method Summary collapse

Methods inherited from Changelog

#all_cookbooks, #clean, #cookbook_highest_version, #detect_cur_revision, #execute, #format_changelog, #generate_from_changelog_file, #generate_from_git_history, #get_from_supermarket_sources, #git?, #git_location, #guess_version_for, #handle_git, #handle_new_cookbook, #handle_source, #handle_submodule, #https_url, #initialize, #linkify, #local?, #new_cookbook?, #short, #supermarket?, #supermarkets_for

Constructor Details

This class inherits a constructor from KnifeChangelog::Changelog

Instance Method Details

#run(submodules) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/knife/changelog/git_submodule.rb', line 8

def run(submodules)
  raise ::ArgumentError, "Submodules must be an Array instead of #{submodules.inspect}" unless submodules.is_a?(::Array)
  submodules.map do |submodule|
    Chef::Log.debug "Checking changelog for #{submodule} (submodule)"
    format_changelog(submodule, *handle_submodule(submodule))
  end.compact.join("\n")
ensure
  clean
end