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

Fetch now just verifies that we have the v8 src

This commit is contained in:
Logan Lowell 2011-06-15 16:08:31 -05:00
parent 24b575c1e9
commit f46468b5c6

View file

@ -23,23 +23,20 @@ Bundler::GemHelper.install_tasks
# end # end
desc "Get the latest source" desc "Get the latest source"
task :fetch do task :src_check do
puts "Fetching latest from github..." if File.exist? File.join('lib', 'libv8', 'v8', 'SConstruct') then
if File.exist? File.join('lib', 'libv8', 'v8') then
Dir.chdir(File.join('lib', 'libv8', 'v8')) do Dir.chdir(File.join('lib', 'libv8', 'v8')) do
`git fetch` `git checkout -f tags/#{`git tag`.split.sort.last}`
`git checkout tags/#{`git tag`.split.sort.last}`
end end
else else
`git clone https://github.com/v8/v8.git lib/libv8/v8` puts "V8 source is missing. Did you initialize and update the submodule?"
Dir.chdir(File.join('lib', 'libv8', 'v8')) do puts "\tTry: git submodule update --init"
`git checkout tags/#{`git tag`.split.sort.last}` fail "Unable to find V8 source!"
end
end end
end end
desc "Compile the V8 JavaScript engine" desc "Compile the V8 JavaScript engine"
task :compile => :fetch do task :compile => :src_check do
puts "Compiling V8..." puts "Compiling V8..."
Dir.chdir(File.join('lib', 'libv8')) do Dir.chdir(File.join('lib', 'libv8')) do
`make` `make`