lib/commands/changelog.rb in gfsm-0.1.4 vs lib/commands/changelog.rb in gfsm-0.2.0
- old
+ new
@@ -74,14 +74,18 @@
repository_path = get_repository_path(args)
configuration_file_path = get_configuration_file_path(args)
version_bumper = GFSM::Tools::VersionBumper.new()
version = version_bumper.compute_version!(force, prerelease, prerelease_name, repository_path, configuration_file_path)
- subdivisions = version_bumper.subdivisions
+ subdivisions = version_bumper.subdivisions.to_a
+ subdivisions.sort_by! { |subdivision_data| subdivision_data[0].priority }.reverse!
changelog_entries = ""
- subdivisions.each do |change_type, commits|
+ subdivisions.each do |subdivision_data|
+ change_type = subdivision_data[0]
+ commits = subdivision_data[1]
+
changelog_entries += "\n#{change_type.to_changelog_entry}\n\n"
commits.each do |commit|
changelog_entries += "- #{commit.to_changelog_entry}\n"
end
\ No newline at end of file