Browse files

Back to green.

  • Loading branch information...
1 parent 3f0ba9b commit 9a92f420337bceec23d9b897aa4109fbc6c0610a @copiousfreetime committed Oct 3, 2012
Showing with 14 additions and 5 deletions.
  1. +2 −1 Rakefile
  2. +12 −4 tasks/extension.rake
View
3 Rakefile
@@ -221,6 +221,7 @@ end
# the gemspec is also a dev artifact and should not be kept around.
CLOBBER << This.gemspec_file
+CLOBBER << "tmp"
# The standard gem packaging task, everyone has it.
require 'rubygems/package_task'
@@ -261,7 +262,7 @@ task :release => [ :release_check, 'manifest:check', :gem ] do
end
#------------------------------------------------------------------------------
-# Load the extension tasks
+# Load the extra tasks
#------------------------------------------------------------------------------
load 'tasks/extension.rake'
View
16 tasks/extension.rake
@@ -28,14 +28,18 @@ namespace :ext do
sh "make"
# install into requireable location so specs will run
- version_sub = RUBY_VERSION.sub(/\.\d$/,'')
- dest_dir = Util.proj_path( 'lib', 'amalgalite', version_sub)
- mkdir_p dest_dir, :verbose => true
- cp "amalgalite3.#{Config::CONFIG['DLEXT']}", dest_dir, :verbose => true
+ mkdir_p ext_dest_dir, :verbose => true
+ cp "amalgalite3.#{Config::CONFIG['DLEXT']}", ext_dest_dir, :verbose => true
end
end
end
+ def ext_dest_dir
+ version_sub = RUBY_VERSION.sub(/\.\d$/,'')
+ dest_dir = Util.proj_path( 'lib', 'amalgalite', version_sub)
+ end
+
+
def with_each_extension
Util.platform_gemspec.extensions.each do |ext|
yield ext
@@ -166,6 +170,7 @@ namespace :ext do
rm_f "rbconfig.rb"
end
end
+ FileUtils.rm_rf ext_dest_dir, :verbose => true
end
desc "Download and integrate the next version of sqlite (use VERSION=x.y.z)"
@@ -207,3 +212,6 @@ namespace :ext do
end
end
end
+task :clobber => 'ext:clobber'
+task :clean => 'ext:clean'
+task :test => 'ext:build'

0 comments on commit 9a92f42

Please sign in to comment.