Skip to content

Commit

Permalink
Add the changelog task
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Dec 18, 2017
1 parent 196a4ee commit ac9a182
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/voxpupuli/release/rake_tasks.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'github_changelog_generator/task'

desc 'Prepare a new release'
task :prepare_release, [:version] do |t, args|
unless args[:version]
Expand Down Expand Up @@ -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
2 changes: 2 additions & 0 deletions voxpupuli-release.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ac9a182

Please sign in to comment.