Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Add release_all tasks to all gems
Browse files Browse the repository at this point in the history
  • Loading branch information
dbussink committed Jan 9, 2010
1 parent 333cd8d commit 561e9d2
Show file tree
Hide file tree
Showing 18 changed files with 107 additions and 20 deletions.
19 changes: 10 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,28 @@ SUDO = WINDOWS ? '' : ('sudo' unless ENV['SUDOLESS'])
# RCov is run by default, except on the JRuby and IronRuby platforms, or if NO_RCOV env is true
RUN_RCOV = JRUBY || IRONRUBY ? false : (ENV.has_key?('NO_RCOV') ? ENV['NO_RCOV'] != 'true' : true)

jruby_projects = %w[do_jdbc do_derby do_h2 do_hsqldb]
projects = %w[data_objects]
projects += %w[do_jdbc do_derby do_h2 do_hsqldb] if JRUBY
projects += %w[do_mysql do_postgres do_sqlite3]
projects += %w[do_mysql do_postgres do_sqlite3 do_sqlserver do_oracle]
projects += jruby_projects if JRUBY

def rake(cmd)
ruby "-S rake #{cmd}", :verbose => false
end

desc 'Release all do gems'
task :release do
projects.each do |dir|
Dir.chdir(dir){ rake "release VERSION=#{ENV["VERSION"]}" }
(projects + jruby_projects).uniq.each do |dir|
Dir.chdir(dir){ rake "release_all" }
end
end

tasks = {
:spec => 'Run the specification',
:install => 'Install the do gems',
:package => 'Package the do gems',
:clean => 'clean temporary files',
:clobber => 'clobber temporary files',
:spec => 'Run the specification',
:install => 'Install the do gems',
:build_all => 'Package the do gems',
:clean => 'clean temporary files',
:clobber => 'clobber temporary files',
}

tasks.each do |name, description|
Expand Down
3 changes: 2 additions & 1 deletion data_objects/data_objects.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Dirkjan Bussink"]
s.date = %q{2010-01-05}
s.date = %q{2010-01-09}
s.description = %q{Provide a standard and simplified API for communicating with RDBMS from Ruby}
s.email = %q{d.bussink@gmail.com}
s.extra_rdoc_files = [
Expand Down Expand Up @@ -76,6 +76,7 @@ Gem::Specification.new do |s|
"spec/transaction_spec.rb",
"spec/uri_spec.rb",
"tasks/metrics.rake",
"tasks/release.rake",
"tasks/spec.rake",
"tasks/yard.rake",
"tasks/yardstick.rake"
Expand Down
14 changes: 14 additions & 0 deletions data_objects/tasks/release.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
desc 'Builds all gems (native, binaries for JRuby and Windows)'
task :build_all do
`rake clean`
`rake build`
end

desc 'Release all gems (native, binaries for JRuby and Windows)'
task :release_all => :build_all do
Dir["pkg/data_objects-#{DataObjects::VERSION}*.gem"].each do |gem_path|
command = "gem push #{gem_path}"
puts "Executing #{command.inspect}:"
sh command
end
end
14 changes: 14 additions & 0 deletions do_derby/tasks/release.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
desc 'Builds all gems (native, binaries for JRuby and Windows)'
task :build_all do
`rake clean`
`rake java gem`
end

desc 'Release all gems (native, binaries for JRuby and Windows)'
task :release_all => :build_all do
Dir["pkg/do_derby-#{DataObjects::Derby::VERSION}*.gem"].each do |gem_path|
command = "gem push #{gem_path}"
puts "Executing #{command.inspect}:"
sh command
end
end
2 changes: 1 addition & 1 deletion do_h2/do_h2.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Alex Coles"]
s.date = %q{2009-12-31}
s.date = %q{2010-01-09}
s.description = %q{Implements the DataObjects API for H2}
s.email = %q{alex@alexcolesportfolio.com}
s.extra_rdoc_files = [
Expand Down
14 changes: 14 additions & 0 deletions do_h2/tasks/release.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
desc 'Builds all gems (native, binaries for JRuby and Windows)'
task :build_all do
`rake clean`
`rake java gem`
end

desc 'Release all gems (native, binaries for JRuby and Windows)'
task :release_all => :build_all do
Dir["pkg/do_h2-#{DataObjects::H2::VERSION}*.gem"].each do |gem_path|
command = "gem push #{gem_path}"
puts "Executing #{command.inspect}:"
sh command
end
end
14 changes: 14 additions & 0 deletions do_hsqldb/tasks/release.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
desc 'Builds all gems (native, binaries for JRuby and Windows)'
task :build_all do
`rake clean`
`rake java gem`
end

desc 'Release all gems (native, binaries for JRuby and Windows)'
task :release_all => :build_all do
Dir["pkg/do_hsqldb-#{DataObjects::Hsqldb::VERSION}*.gem"].each do |gem_path|
command = "gem push #{gem_path}"
puts "Executing #{command.inspect}:"
sh command
end
end
14 changes: 14 additions & 0 deletions do_jdbc/tasks/release.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
desc 'Builds all gems (native, binaries for JRuby and Windows)'
task :build_all do
`rake clean`
`rake java gem`
end

desc 'Release all gems (native, binaries for JRuby and Windows)'
task :release_all => :build_all do
Dir["pkg/do_jdbc-#{DataObjects::Jdbc::VERSION}*.gem"].each do |gem_path|
command = "gem push #{gem_path}"
puts "Executing #{command.inspect}:"
sh command
end
end
2 changes: 1 addition & 1 deletion do_mysql/do_mysql.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Dirkjan Bussink"]
s.date = %q{2010-01-05}
s.date = %q{2010-01-09}
s.description = %q{Implements the DataObjects API for MySQL}
s.email = %q{d.bussink@gmail.com}
s.extensions = ["ext/do_mysql/extconf.rb"]
Expand Down
2 changes: 1 addition & 1 deletion do_mysql/tasks/release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ desc 'Release all gems (native, binaries for JRuby and Windows)'
task :release_all => :build_all do
Dir["pkg/do_mysql-#{DataObjects::Mysql::VERSION}*.gem"].each do |gem_path|
command = "gem push #{gem_path}"
output.puts "Executing #{command.inspect}:"
puts "Executing #{command.inspect}:"
sh command
end
end
2 changes: 1 addition & 1 deletion do_oracle/do_oracle.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Raimonds Simanovskis"]
s.date = %q{2009-12-31}
s.date = %q{2010-01-09}
s.description = %q{Implements the DataObjects API for Oracle}
s.email = %q{raimonds.simanovskis@gmail.com}
s.extensions = ["ext/do_oracle/extconf.rb"]
Expand Down
2 changes: 1 addition & 1 deletion do_oracle/tasks/release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ desc 'Release all gems (native, binaries for JRuby and Windows)'
task :release_all => :build_all do
Dir["pkg/do_oracle-#{DataObjects::Oracle::VERSION}*.gem"].each do |gem_path|
command = "gem push #{gem_path}"
output.puts "Executing #{command.inspect}:"
puts "Executing #{command.inspect}:"
sh command
end
end
2 changes: 1 addition & 1 deletion do_postgres/do_postgres.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Dirkjan Bussink"]
s.date = %q{2010-01-05}
s.date = %q{2010-01-09}
s.description = %q{Implements the DataObjects API for PostgreSQL}
s.email = %q{d.bussink@gmail.com}
s.extensions = ["ext/do_postgres/extconf.rb"]
Expand Down
2 changes: 1 addition & 1 deletion do_postgres/tasks/release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ desc 'Release all gems (native, binaries for JRuby and Windows)'
task :release_all => :build_all do
Dir["pkg/do_postgres-#{DataObjects::Postgres::VERSION}*.gem"].each do |gem_path|
command = "gem push #{gem_path}"
output.puts "Executing #{command.inspect}:"
puts "Executing #{command.inspect}:"
sh command
end
end
2 changes: 1 addition & 1 deletion do_sqlite3/do_sqlite3.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Dirkjan Bussink"]
s.date = %q{2010-01-05}
s.date = %q{2010-01-09}
s.description = %q{Implements the DataObjects API for Sqlite3}
s.email = %q{d.bussink@gmail.com}
s.extensions = ["ext/do_sqlite3/extconf.rb"]
Expand Down
2 changes: 1 addition & 1 deletion do_sqlite3/tasks/release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ desc 'Release all gems (native, binaries for JRuby and Windows)'
task :release_all => :build_all do
Dir["pkg/do_sqlite3-#{DataObjects::Sqlite3::VERSION}*.gem"].each do |gem_path|
command = "gem push #{gem_path}"
output.puts "Executing #{command.inspect}:"
puts "Executing #{command.inspect}:"
sh command
end
end
3 changes: 2 additions & 1 deletion do_sqlserver/do_sqlserver.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Alex Coles"]
s.date = %q{2009-12-31}
s.date = %q{2010-01-09}
s.description = %q{Implements the DataObjects API for Microsoft SQL Server}
s.email = %q{alex@alexcolesportfolio.com}
s.extra_rdoc_files = [
Expand Down Expand Up @@ -53,6 +53,7 @@ Gem::Specification.new do |s|
"spec/typecast/string_spec.rb",
"spec/typecast/time_spec.rb",
"tasks/compile.rake",
"tasks/release.rake",
"tasks/spec.rake"
]
s.has_rdoc = false
Expand Down
14 changes: 14 additions & 0 deletions do_sqlserver/tasks/release.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
desc 'Builds all gems (native, binaries for JRuby and Windows)'
task :build_all do
`rake clean`
`rake java gem`
end

desc 'Release all gems (native, binaries for JRuby and Windows)'
task :release_all => :build_all do
Dir["pkg/do_sqlserver-#{DataObjects::SqlServer::VERSION}*.gem"].each do |gem_path|
command = "gem push #{gem_path}"
puts "Executing #{command.inspect}:"
sh command
end
end

0 comments on commit 561e9d2

Please sign in to comment.