~gandelman-a/ubuntu/precise/facter/merge922788

« back to all changes in this revision

Viewing changes to tasks/rake/changlog.rake

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman
  • Date: 2011-10-18 10:32:42 UTC
  • mfrom: (1.3.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: package-import@ubuntu.com-20111018103242-ag8i8vejfp8v7b1b
Tags: upstream-1.6.1
ImportĀ upstreamĀ versionĀ 1.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
desc "Create a ChangeLog based on git commits."
2
 
task :changelog do
3
 
    begin
4
 
         gitc = %x{which git-changelog}
5
 
    rescue 
6
 
        puts "This task needs the git-changelog binary - http://github.com/ReinH/git-changelog"
7
 
    end
8
 
 
9
 
    CHANGELOG_DIR = "#{Dir.pwd}"
10
 
    mkdir(CHANGELOG_DIR) unless File.directory?(CHANGELOG_DIR)
11
 
    change_body = `git-changelog --limit=99999`
12
 
    File.open(File.join(CHANGELOG_DIR, "CHANGELOG"), 'w') do |f|
13
 
        f << change_body
14
 
    end
15
 
end