diff --git a/Rakefile b/Rakefile index b38899c5..eab4bf94 100644 --- a/Rakefile +++ b/Rakefile @@ -87,3 +87,19 @@ task :uninstall => [:clean] do sh %{sudo gem uninstall mongrel} sub_project("gem_plugin", :uninstall) end + + +task :gem_source => [:clean, :package] do + sub_project "gem_plugin", :clean, :test, :package + sub_project "mongrel_config", :clean, :test, :package + sub_project "mongrel_status", :clean, :test, :package + + mkdir_p "pkg/gems" + + FileList["**/*.gem"].each { |gem| mv gem, "pkg/gems" } + FileList["pkg/*.tgz"].each {|tgz| rm tgz } + rm_rf "pkg/#{name}-#{version}" + + sh %{ generate_yaml_index.rb -d pkg } + sh %{ scp -r pkg/* #{ENV['SSH_USER']}@rubyforge.org:/var/www/gforge-projects/mongrel/releases/ } +end diff --git a/tools/rakehelp.rb b/tools/rakehelp.rb index 959175b9..3cda4a1c 100644 --- a/tools/rakehelp.rb +++ b/tools/rakehelp.rb @@ -104,6 +104,8 @@ def setup_win32_gem(pkg_name, pkg_version) Gem::Builder.new(spec).build end -def sub_project(project, target="") - sh %{cd projects/#{project}; rake #{target.to_s}; } +def sub_project(project, *targets) + targets.each do |target| + sh %{cd projects/#{project}; rake #{target.to_s}; } + end end