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:
parent
aeaad343b8
commit
c1fa29bf6d
1 changed files with 11 additions and 3 deletions
14
Rakefile
14
Rakefile
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue