mirror of
https://github.com/rubyjs/libv8
synced 2023-03-27 23:21:48 -04:00
Changed the build process to always checkout the latest stable version during build
This commit is contained in:
parent
42b2bacfd7
commit
a30037363a
2 changed files with 10 additions and 14 deletions
20
Rakefile
20
Rakefile
|
@ -12,8 +12,6 @@ end
|
||||||
require 'bundler'
|
require 'bundler'
|
||||||
require 'bundler/setup'
|
require 'bundler/setup'
|
||||||
|
|
||||||
# require "rake/extensiontask"
|
|
||||||
|
|
||||||
Bundler::GemHelper.install_tasks
|
Bundler::GemHelper.install_tasks
|
||||||
|
|
||||||
# desc "remove all generated artifacts except built v8 objects"
|
# desc "remove all generated artifacts except built v8 objects"
|
||||||
|
@ -33,21 +31,19 @@ Bundler::GemHelper.install_tasks
|
||||||
# ext.lib_dir = "lib/libv8"
|
# ext.lib_dir = "lib/libv8"
|
||||||
# end
|
# end
|
||||||
|
|
||||||
desc "Get the latest source"
|
desc "Check out the latest stable version"
|
||||||
task :src_check do
|
task :latest_stable do
|
||||||
if File.exist? File.join('lib', 'libv8', 'v8', 'SConstruct') then
|
|
||||||
Dir.chdir(File.join('lib', 'libv8', 'v8')) do
|
Dir.chdir(File.join('lib', 'libv8', 'v8')) do
|
||||||
`git checkout -f tags/#{`git tag`.split.sort.last}`
|
`git fetch`
|
||||||
end
|
# We're checking out the latest tag. Sorted using Gem::Version
|
||||||
else
|
latest = `git tag`.split.map{|v| Gem::Version.new(v)}.sort.last
|
||||||
puts "V8 source is missing. Did you initialize and update the submodule?"
|
puts "Checking out latest stable V8 version (#{latest})"
|
||||||
puts "\tTry: git submodule update --init"
|
`git checkout -f tags/#{latest}`
|
||||||
fail "Unable to find V8 source!"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Compile the V8 JavaScript engine"
|
desc "Compile the V8 JavaScript engine"
|
||||||
task :compile => :src_check do
|
task :compile => :latest_stable do
|
||||||
puts "Compiling V8..."
|
puts "Compiling V8..."
|
||||||
Dir.chdir(File.join('lib', 'libv8')) do
|
Dir.chdir(File.join('lib', 'libv8')) do
|
||||||
`make`
|
`make`
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit de15804c3fd5bbbb44543f00878ae301d92f7ace
|
Subproject commit 064fc53841ba4624b9e8487412ff274d034008d1
|
Loading…
Add table
Add a link
Reference in a new issue