1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

Rake task for installing the native gem

This commit is contained in:
Charles Lowell 2012-06-14 04:42:43 -05:00
parent aeaad343b8
commit c1fa29bf6d

View file

@ -21,12 +21,20 @@ task :sanity => [:clean, :compile] do
sh %q{ruby -Ilib -e "require 'v8'"} sh %q{ruby -Ilib -e "require 'v8'"}
end end
desc "Build therubyracer-#{V8::VERSION}-#{Gem::Platform.new(RUBY_PLATFORM)}.gem into the pkg directory" NativeGem = "pkg/therubyracer-#{V8::VERSION}-#{Gem::Platform.new(RUBY_PLATFORM)}.gem"
task "build:native" => :build do file NativeGem => :build do
require "rubygems/compiler" require "rubygems/compiler"
compiler = Gem::Compiler.new("pkg/therubyracer-#{V8::VERSION}.gem", File.expand_path('../pkg', __FILE__)) compiler = Gem::Compiler.new("pkg/therubyracer-#{V8::VERSION}.gem", 'pkg')
compiler.compile compiler.compile
end end
desc "Build #{NativeGem} into the pkg directory"
task "build:native" => NativeGem
desc "Build and install #{File.basename NativeGem} into system gems"
task "install:native" => "build:native" do
sh "gem install #{NativeGem}"
end
task :default => :spec task :default => :spec