Skip to content

Commit

Permalink
add rake task to build binary gem on heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboyd committed Jan 8, 2013
1 parent a9f44f2 commit 34baef1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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]
1 change: 1 addition & 0 deletions libv8.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 34baef1

Please sign in to comment.