42
41
gem.author = "Luke Kanies"
46
project.mkepmtask do |task|
47
task.bins = FileList.new("bin/facter")
48
task.rubylibs = FileList.new('lib/**/*')
53
45
raise ArgumentError, "You must specify the archive name by setting ARCHIVE; e.g., ARCHIVE=1.5.1rc1" unless archive = ENV["ARCHIVE"]
55
47
sh "git archive --format=tar --prefix=facter-#{archive}/ HEAD | gzip -c > facter-#{archive}.tgz"
52
desc "Run the CI prep tasks"
56
require 'ci/reporter/rake/rspec'
57
require 'ci/reporter/rake/test_unit'
58
ENV['CI_REPORTS'] = 'results'
61
desc "Run CI RSpec tests"
62
task :spec => [:prep, 'ci:setup:rspec'] do
63
sh "cd spec; rake all; exit 0"
68
desc "Send patch information to the puppet-dev list"
70
if Dir.glob("00*.patch").length > 0
71
raise "Patches already exist matching '00*.patch'; clean up first"
74
unless %x{git status} =~ /On branch (.+)/
75
raise "Could not get branch from 'git status'"
79
unless branch =~ %r{^([^\/]+)/([^\/]+)/([^\/]+)$}
80
raise "Branch name does not follow <type>/<parent>/<name> model; cannot autodetect parent branch"
83
type, parent, name = $1, $2, $3
85
# Create all of the patches
86
sh "git format-patch -C -M -s -n #{parent}..HEAD"
88
# And then mail them out.
90
# If we've got more than one patch, add --compose
91
if Dir.glob("00*.patch").length > 1
98
sh "git send-email #{compose} --no-chain-reply-to --no-signed-off-by-cc --suppress-from --no-thread --to puppet-dev@googlegroups.com 00*.patch"
100
# Finally, clean up the patches