summaryrefslogtreecommitdiffstats
path: root/tasks/rake/changelog.rake
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2009-09-15 23:30:29 +1000
committerJames Turnbull <james@lovedthanlost.net>2009-09-15 23:30:29 +1000
commitb1554a1a38aa7a4da6c9927e26c9411af4ce1dff (patch)
tree97225fcbcd697ada7100f998d4fba7ea1e7c84b9 /tasks/rake/changelog.rake
parentf5a106dd61947146138148f64967122a4c9021d1 (diff)
downloadpuppet-b1554a1a38aa7a4da6c9927e26c9411af4ce1dff.tar.gz
puppet-b1554a1a38aa7a4da6c9927e26c9411af4ce1dff.tar.xz
puppet-b1554a1a38aa7a4da6c9927e26c9411af4ce1dff.zip
Updated changelog task and CHANGELOG to version aware
Diffstat (limited to 'tasks/rake/changelog.rake')
-rw-r--r--tasks/rake/changelog.rake15
1 files changed, 15 insertions, 0 deletions
diff --git a/tasks/rake/changelog.rake b/tasks/rake/changelog.rake
new file mode 100644
index 000000000..adeeb03a4
--- /dev/null
+++ b/tasks/rake/changelog.rake
@@ -0,0 +1,15 @@
+desc "Create a ChangeLog based on git commits."
+task :changelog do
+ begin
+ gitc = %x{which git-changelog}
+ rescue
+ puts "This task needs the git-changelog binary - http://github.com/ReinH/git-changelog"
+ end
+
+ CHANGELOG_DIR = "#{Dir.pwd}"
+ mkdir(CHANGELOG_DIR) unless File.directory?(CHANGELOG_DIR)
+ change_body = `git-changelog --no-limit -a`
+ File.open(File.join(CHANGELOG_DIR, "CHANGELOG"), 'w') do |f|
+ f << change_body
+ end
+end