diff --git a/lib/voxpupuli/release/rake_tasks.rb b/lib/voxpupuli/release/rake_tasks.rb index ff975cb..a0de02f 100644 --- a/lib/voxpupuli/release/rake_tasks.rb +++ b/lib/voxpupuli/release/rake_tasks.rb @@ -1,3 +1,5 @@ +require 'github_changelog_generator/task' + desc 'Prepare a new release' task :prepare_release, [:version] do |t, args| unless args[:version] @@ -63,3 +65,12 @@ fail "Unable to find a CHANGELOG.md entry for the #{v} release." end end + +GitHubChangelogGenerator::RakeTask.new :changelog do |config| + modulefile = Blacksmith::Modulefile.new + config.user = 'voxpupuli' + config.project = modulefile.name + config.future_release = "v#{modulefile.version}" if modulefile.version =~ /^\d+\.\d+.\d+$/ + config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module." + config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog} +end diff --git a/voxpupuli-release.gemspec b/voxpupuli-release.gemspec index e51a5a4..0b4c703 100644 --- a/voxpupuli-release.gemspec +++ b/voxpupuli-release.gemspec @@ -19,4 +19,6 @@ Gem::Specification.new do |s| # Runtime dependencies, but also probably dependencies of requiring projects s.add_runtime_dependency 'rake' s.add_runtime_dependency 'puppet-blacksmith', '>= 4.0.0' + # We actually want an unreleased version from it + s.add_runtime_dependency 'github_changelog_generator', '>= 1.14.0' end