diff options
author | Paul Berry <paul@puppetlabs.com> | 2010-11-17 14:48:03 -0800 |
---|---|---|
committer | Paul Berry <paul@puppetlabs.com> | 2010-11-17 14:48:03 -0800 |
commit | 03af0ccd085a39f60b20a313d8b9f5b71da8a22f (patch) | |
tree | 94dc7b89ba2e48ebf58bea3a3a48d78f75bc6ddd | |
parent | bc91f0802b2c475316811431ff7945b14eb78421 (diff) | |
parent | c7d85a30ec68989ac3367d2a71afb99d865a984d (diff) | |
download | facter-03af0ccd085a39f60b20a313d8b9f5b71da8a22f.tar.gz facter-03af0ccd085a39f60b20a313d8b9f5b71da8a22f.tar.xz facter-03af0ccd085a39f60b20a313d8b9f5b71da8a22f.zip |
Merge branch 'next'
-rw-r--r-- | Rakefile | 1 | ||||
-rw-r--r-- | tasks/rake/mail_patches.rake | 13 |
2 files changed, 13 insertions, 1 deletions
@@ -3,6 +3,7 @@ $: << File.expand_path('lib') $LOAD_PATH << File.join(File.dirname(__FILE__), 'tasks') +require 'rubygems' require 'spec' require 'spec/rake/spectask' begin diff --git a/tasks/rake/mail_patches.rake b/tasks/rake/mail_patches.rake index 6375a22..be8dda1 100644 --- a/tasks/rake/mail_patches.rake +++ b/tasks/rake/mail_patches.rake @@ -18,10 +18,21 @@ task :mail_patches do # Create all of the patches sh "git format-patch -C -M -s -n --subject-prefix='PATCH/facter' #{parent}..HEAD" + # Add info to the patches + additional_info = "Local-branch: #{branch}\n" + files = Dir.glob("00*.patch") + files.each do |file| + contents = File.read(file) + contents.sub!(/^---\n/, "---\n#{additional_info}") + File.open(file, 'w') do |file_handle| + file_handle.print contents + end + end + # And then mail them out. # If we've got more than one patch, add --compose - if Dir.glob("00*.patch").length > 1 + if files.length > 1 compose = "--compose" else compose = "" |