Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update -more release task.

  • Loading branch information...
commit 0fed7185a252e8c70eefef33f793d992dce53224 1 parent 1f51935
Michael Klishin michaelklishin authored

Showing 1 changed file with 23 additions and 13 deletions. Show diff stats Hide diff stats

  1. +23 13 Rakefile
36 Rakefile
@@ -17,7 +17,7 @@ include FileUtils
17 17
18 18 gems = %w[
19 19 merb-action-args merb-assets merb-gen merb-haml
20   - merb-builder merb-mailer merb-parts merb-cache merb-freezer merb-slices
  20 + merb-builder merb-mailer merb-parts merb-cache merb-freezer merb-slices merb-jquery
21 21 ]
22 22
23 23 merb_more_spec = Gem::Specification.new do |s|
@@ -128,13 +128,9 @@ RUBY_FORGE_PROJECT = "merb"
128 128 GROUP_NAME = "merb"
129 129 PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
130 130 PKG_VERSION = GEM_VERSION + PKG_BUILD
131   -# PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
132 131
133 132 RELEASE_NAME = "REL #{PKG_VERSION}"
134 133
135   -# FIXME: hey, someone take care of me
136   -RUBY_FORGE_USER = ""
137   -
138 134 namespace :release do
139 135 desc "Publish Merb More release files to RubyForge."
140 136 task :merb_more => [ :package ] do
@@ -143,12 +139,18 @@ namespace :release do
143 139
144 140 packages = %w( gem tgz zip ).collect{ |ext| "pkg/merb-more-#{PKG_VERSION}.#{ext}" }
145 141
146   - rubyforge = RubyForge.new
147   - rubyforge.login
148   - rubyforge.add_release(GROUP_NAME, "merb-more", "REL #{PKG_VERSION}", *packages)
  142 + begin
  143 + sh %{rubyforge login}
  144 + sh %{rubyforge add_release #{RUBY_FORGE_PROJECT} merb-more #{Merb::MORE_VERSION} #{packages.join(' ')}}
  145 + sh %{rubyforge add_file #{RUBY_FORGE_PROJECT} merb-more #{Merb::MORE_VERSION} #{packages.join(' ')}}
  146 + rescue Exception => e
  147 + puts
  148 + puts "Release failed: #{e.message}"
  149 + puts
  150 + puts "Set PKG_BUILD environment variable if you do a subrelease (0.9.4.2008_08_02 when version is 0.9.4)"
  151 + end
149 152 end
150 153
151   -
152 154 desc "Publish Merb More gem to RubyForge, one by one."
153 155 task :merb_more_gems => [ :build_gems ] do
154 156 gems.each do |gem|
@@ -156,7 +158,7 @@ namespace :release do
156 158 end
157 159 end
158 160
159   -
  161 +
160 162 desc "Publish Merb release files to RubyForge."
161 163 task :merb => [ :package ] do
162 164 require 'rubyforge'
@@ -164,8 +166,16 @@ namespace :release do
164 166
165 167 packages = %w( gem tgz zip ).collect{ |ext| "pkg/merb-#{PKG_VERSION}.#{ext}" }
166 168
167   - rubyforge = RubyForge.new
168   - rubyforge.login
169   - rubyforge.add_release(GROUP_NAME, "merb", "REL #{PKG_VERSION}", *packages)
  169 + begin
  170 + sh %{rubyforge login}
  171 + sh %{rubyforge add_release #{RUBY_FORGE_PROJECT} merb #{Merb::VERSION} #{packages.join(' ')}}
  172 + sh %{rubyforge add_file #{RUBY_FORGE_PROJECT} merb #{Merb::VERSION} #{packages.join(' ')}}
  173 + rescue Exception => e
  174 + puts
  175 + puts "Release failed: #{e.message}"
  176 + puts
  177 + puts "Set PKG_BUILD environment variable if you do a subrelease (0.9.4.2008_08_02 when version is 0.9.4)"
  178 + end
170 179 end
171 180 end
  181 +

0 comments on commit 0fed718

Please sign in to comment.
Something went wrong with that request. Please try again.