From 34baef1be6c7c3257688d21a37f1ef00e8f79634 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 7 Jan 2013 23:33:48 -0600 Subject: [PATCH] add rake task to build binary gem on heroku --- Rakefile | 7 +++++++ libv8.gemspec | 1 + 2 files changed, 8 insertions(+) diff --git a/Rakefile b/Rakefile index 259ef07a..68e54cd9 100644 --- a/Rakefile +++ b/Rakefile @@ -80,5 +80,12 @@ task :clean do sh "cd #{V8_Source} && git checkout -f && git clean -dxf" end +desc "build a binary on heroku (you must have vulcan configured for this)" +task :vulcan => directory("tmp/vulcan") do + Dir.chdir('tmp/vulcan') do + sh "vulcan build -v -c 'LANG=en_US.UTF-8 export BIN=/`pwd`/bin && export GEM=$BIN/gem && curl https://s3.amazonaws.com/heroku-buildpack-ruby/ruby-1.9.3.tgz > ruby-1.9.3.tgz && tar xf ruby-1.9.3.tgz && cd /tmp && $GEM fetch libv8 --platform=ruby --version=#{Libv8::VERSION} && $GEM unpack libv8*.gem && $GEM install bundler -n $BIN --no-ri --no-rdoc && cd libv8-#{Libv8::VERSION} && $BIN/bundle && $BIN/bundle exec rake binary' -p /tmp/libv8-#{Libv8::VERSION}" + end +end + task :default => [:checkout, :compile, :spec] task :build => [:clean, :checkout] diff --git a/libv8.gemspec b/libv8.gemspec index 55775cf6..0ccc5c65 100644 --- a/libv8.gemspec +++ b/libv8.gemspec @@ -28,4 +28,5 @@ Gem::Specification.new do |s| s.add_development_dependency "rake-compiler" s.add_development_dependency "rspec" s.add_development_dependency "rspec-spies" + s.add_development_dependency "vulcan" end