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

add a rake task to build a binary distro.

This commit is contained in:
Charles Lowell 2012-04-25 22:26:17 -05:00
parent 1ff9b95b6e
commit 5bc8c8fe18

View file

@ -23,7 +23,22 @@ task :compile do
end
end
"clean up artifacts of the build"
desc "build a binary gem"
task :binary => :compile do
gemspec = eval(File.read('libv8.gemspec'))
gemspec.extensions.clear
gemspec.platform = Gem::Platform.new(RUBY_PLATFORM)
# We don't need most things for the binary
gemspec.files = ['lib/libv8.rb', 'lib/libv8/version.rb']
# V8
gemspec.files += Dir['vendor/v8/include/*']
gemspec.files += Dir['vendor/v8/out/native/*']
FileUtils.mkdir_p 'pkg'
FileUtils.mv(Gem::Builder.new(gemspec).build, 'pkg')
end
desc "clean up artifacts of the build"
task :clean do
sh "rm -rf pkg"
sh "cd #{V8_Source} && rm -rf out"