Codebase list facter / 1eef842
Maint: add "Local-branch:" info to mails sent by "rake mail_patches" Paul Berry 13 years ago
1 changed file(s) with 12 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1717 # Create all of the patches
1818 sh "git format-patch -C -M -s -n --subject-prefix='PATCH/facter' #{parent}..HEAD"
1919
20 # Add info to the patches
21 additional_info = "Local-branch: #{branch}\n"
22 files = Dir.glob("00*.patch")
23 files.each do |file|
24 contents = File.read(file)
25 contents.sub!(/^---\n/, "---\n#{additional_info}")
26 File.open(file, 'w') do |file_handle|
27 file_handle.print contents
28 end
29 end
30
2031 # And then mail them out.
2132
2233 # If we've got more than one patch, add --compose
23 if Dir.glob("00*.patch").length > 1
34 if files.length > 1
2435 compose = "--compose"
2536 else
2637 compose = ""