Skip to content

Commit

Permalink
add a rake task to build a binary distro.
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboyd committed Apr 26, 2012
1 parent 1ff9b95 commit 5bc8c8f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5bc8c8f

Please sign in to comment.