summaryrefslogtreecommitdiffstats
path: root/tasks/rake/changelog.rake
blob: 0c2f1d26c5b2f1a0ec879e0836e0fd40a186a9e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 --limit=99999`
    File.open(File.join(CHANGELOG_DIR, "CHANGELOG"), 'w') do |f|
        f << change_body
    end
end