lib/simp/relchecks.rb in simp-rake-helpers-5.4.1 vs lib/simp/relchecks.rb in simp-rake-helpers-5.4.3
- old
+ new
@@ -29,11 +29,11 @@
# +component_dir+:: The root directory of the component project.
# +tags_source+:: The remote from which the tags for this project
# can be fetched.
# +verbose+:: Set to 'true' if you want to see detailed messages
def self.compare_latest_tag(component_dir, tags_source = 'origin', verbose = false)
- info, changelogs = load_and_validate_changelog(component_dir, verbose)
+ info, _ = load_and_validate_changelog(component_dir, verbose)
Dir.chdir(component_dir) do
# determine last tag
`git fetch -t #{tags_source} 2>/dev/null`
tags = `git tag -l`.split("\n")
puts "Available tags from #{tags_source} = #{tags}" if verbose
@@ -131,11 +131,10 @@
# +verbose+:: Whether to log non-catestrophic changelog parsing
# failures.
def self.extract_version_changelog(changelog_entries, version,
release=nil, verbose=false)
- version_entry_found = false
changelogs = []
changelog_entries.each do |entry|
if entry[:version] > version
fail("ERROR: Changelog entry for version > #{version} found: \n #{entry[:content].join("\n")}")
elsif entry[:version] < version
@@ -160,10 +159,10 @@
end
def self.load_and_validate_changelog(component_dir, verbose)
# only get valid changelog entries for the latest version
# (up to the first malformed entry)
- info = Simp::ComponentInfo.new(component_dir, true)
+ info = Simp::ComponentInfo.new(component_dir, true, verbose)
changelogs = extract_version_changelog(info.changelog, info.version,
info.release, verbose)
[info, changelogs]