Permalink
Browse files

Fixing up release process in padrino-framework Rakefile

  • Loading branch information...
nesquena committed Nov 24, 2009
1 parent 5ca2054 commit 6bf8bd050ac7e2665baf5374ae991ee9bf6e284d
Showing with 19 additions and 4 deletions.
  1. +18 −4 Rakefile
  2. +1 −0 VERSION
View
@@ -1,9 +1,12 @@
+require 'pathname'
require "rake/clean"
require "rake/gempackagetask"
require 'fileutils'
include FileUtils
-ROOT = File.dirname(__FILE__)
+ROOT = Pathname(__FILE__).dirname.expand_path
+GEM_NAME = 'padrino-framework'
+GEM_VERSION = ROOT.join('VERSION').read
padrino_gems = [
"padrino-core",
@@ -15,15 +18,17 @@ padrino_gems = [
"padrino-routing",
"padrino"
]
+
+GEM_PATHS = padrino_gems.freeze
def rake_command(command)
- sh "#{Gem.ruby} -S rake #{command}"
+ sh "#{Gem.ruby} -S rake #{command}", :verbose => true
end
-%w(install gemspec build release).each do |task_name|
+%w(install gemspec build).each do |task_name|
desc "Run #{task_name} for all projects"
task task_name do
- padrino_gems.each do |dir|
+ GEM_PATHS.each do |dir|
Dir.chdir(dir) { rake_command(task_name) }
end
end
@@ -47,6 +52,15 @@ task :publish do
end
end
+# NOTE: this task must be named release_all, and not release
+desc "Release #{GEM_NAME} #{GEM_VERSION}"
+task :release_all do
+ # sh "rake release VERSION=#{GEM_VERSION}"
+ GEM_PATHS.each do |dir|
+ Dir.chdir(dir) { rake_command "release VERSION=#{GEM_VERSION}" }
+ end
+end
+
desc "Run tests for all padrino stack gems"
task :test do
# Omit the padrino metagem since no tests there
View
@@ -0,0 +1 @@
+0.2.0

0 comments on commit 6bf8bd0

Please sign in to comment.