@@ -2,6 +2,11 @@ require 'puppetlabs_spec_helper/rake_tasks'
22require 'puppet-lint/tasks/puppet-lint'
33require 'puppet-syntax/tasks/puppet-syntax'
44
5+ begin
6+ require 'puppet_blacksmith/rake_tasks'
7+ rescue LoadError
8+ end
9+
510PuppetLint . configuration . fail_on_warnings = true
611PuppetLint . configuration . relative = true
712PuppetLint . configuration . send ( 'disable_80chars' )
@@ -26,3 +31,24 @@ task :test => [
2631 :spec ,
2732 :metadata_lint ,
2833]
34+
35+ if RUBY_VERSION >= "2.1.0" then
36+ Blacksmith ::RakeTask . new do |t |
37+ t . build = false # do not build the module nor push it to the Forge
38+ # just do the tagging [:clean, :tag, :bump_commit]
39+ end
40+
41+ desc "Offload release process to Travis."
42+ task :travis_release => [
43+ :check_changelog , # check that the changelog contains an entry for the current release
44+ :"module:release" , # do everything except build / push to forge, travis will do that for us
45+ ]
46+
47+ desc "Check Changelog."
48+ task :check_changelog do
49+ v = Blacksmith ::Modulefile . new . version
50+ if File . readlines ( 'CHANGELOG.md' ) . grep ( "Releasing #{ v } " ) . size == 0 then
51+ fail "Unable to find a CHANGELOG.md entry for the #{ v } release."
52+ end
53+ end
54+ end
0 commit comments