diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2013-09-27 17:15:02 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2013-09-27 17:15:02 -0700 |
commit | f6bba53945cb06846807ab70941674db1b35772a (patch) | |
tree | 1b6f381a96ed1652fc06fc22735c45439a8d3d8d /Rakefile | |
parent | 008973c3c0b5598eed5f8d649c3eb8c6adf9325a (diff) | |
download | chef-f6bba53945cb06846807ab70941674db1b35772a.tar.gz |
use separate gemspec for windows
- allows us to explicitly version pin in the gemspec on gem installs
rather than getting different behavior from 'gem install' and
'bundle install' (gemspec vs. Gemfile).
- the mingw deps had been in the Gemfile because it needed to be a
group since gemspecs do not have groups. this builds two different
gems for publication to rubygems instead.
- see mixlib-shellout for the prototype of where this has been done
(successfully).
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -26,13 +26,12 @@ require './tasks/rspec.rb' GEM_NAME = "chef" -spec = eval(File.read("chef.gemspec")) - # This has to be here or else the docs get generated *after* the gem is created task :gem => 'docs:all' -Gem::PackageTask.new(spec) do |pkg| - pkg.gem_spec = spec +Dir[File.expand_path("../*gemspec", __FILE__)].reverse.each do |gemspec_path| + gemspec = eval(IO.read(gemspec_path)) + Gem::PackageTask.new(gemspec).define end begin @@ -60,6 +59,15 @@ task :uninstall do sh %{gem uninstall #{GEM_NAME} -x -v #{Chef::VERSION} } end +desc "Build it, tag it and ship it" +task :ship => :gem do + sh("git tag #{Chef::VERSION}") + sh("git push opscode --tags") + Dir[File.expand_path("../pkg/*.gem", __FILE__)].reverse.each do |built_gem| + sh("gem push #{built_gem}") + end +end + RONN_OPTS = "--manual='Chef Manual' --organization='Chef #{Chef::VERSION}' --date='#{Time.new.strftime('%Y-%m-%d')}'" namespace :docs do |