Browse files

Use RubyGems' PackageTask to build the gem

  • Loading branch information...
1 parent 5914b1e commit 3c9735081afb010df5c252533a08de376864745b @luislavena luislavena committed with metaskills Apr 6, 2011
Showing with 4 additions and 10 deletions.
  1. +4 −10 Rakefile
View
14 Rakefile
@@ -4,7 +4,7 @@ require "rake/clean"
require 'rbconfig'
require 'rake/testtask'
require 'rake/extensiontask'
-require 'mini_portile'
+require "rubygems/package_task"
Dir["tasks/*.rake"].sort.each { |f| load f }
@@ -26,15 +26,9 @@ Rake::TestTask.new do |t|
t.verbose = true
end
-desc "Build the gem"
-task :gem => [:distclean] do
- sh %{gem build tiny_tds.gemspec}
-end
-
-desc "Try to clean up everything"
-task :distclean do
- CLEAN.concat(['pkg', 'tiny_tds-*.gem', 'tmp', 'lib/tiny_tds/tiny_tds.bundle'])
- Rake::Task[:clean].invoke
+Gem::PackageTask.new(gemspec) do |pkg|
+ pkg.need_tar = false
+ pkg.need_zip = false
end
task :compile => ["ports:freetds"] unless ENV['TINYTDS_SKIP_PORTS']

0 comments on commit 3c97350

Please sign in to comment.