summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorDaniel DeLeo <dan@opscode.com>2011-12-01 16:23:38 -0800
committerDaniel DeLeo <dan@opscode.com>2011-12-01 16:24:31 -0800
commitf52515eabe47ee38d77ef57603923e2b535ee3dd (patch)
tree0f8d5e3a578eeda2b0933369997de2ee05e865a7 /Rakefile
parentdb7c3b2f040fd75c92bdfabd9c2d3fff03e0dd72 (diff)
downloadmixlib-shellout-f52515eabe47ee38d77ef57603923e2b535ee3dd.tar.gz
initial multi-gem build support
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index 93c73e3..17b0501 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,12 +1,25 @@
require 'rspec/core/rake_task'
require 'rubygems/package_task'
-gemspec = eval(IO.read('mixlib-shellout.gemspec'))
-Gem::PackageTask.new(gemspec).define
+Dir[File.expand_path("../*gemspec", __FILE__)].each do |gemspec_path|
+ gemspec = eval(IO.read(gemspec_path))
+ Gem::PackageTask.new(gemspec).define
+end
+
+require 'mixlib/shellout/version'
desc "Run all specs in spec directory"
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = FileList['spec/**/*_spec.rb']
end
+desc "Build it and ship it"
+task :ship => :gem do
+ sh("git tag #{Mixlib::ShellOut::Version}")
+ sh("git push opscode --tags")
+ Dir[File.expand_path("../pkg/*.gem", __FILE__)].each do |built_gem|
+ sh("gem push #{built_gem}")
+ end
+end
+
task :default => :spec