Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added support for git checkout.

  • Loading branch information...
commit aadee1f8129eae24f3b5580460029316462e5a27 1 parent 755c5dd
@voxik voxik authored
Showing with 20 additions and 0 deletions.
  1. +3 −0  config/ruby_installer.rb
  2. +17 −0 recipes/interpreter/rbx.rake
View
3  config/ruby_installer.rb
@@ -127,6 +127,9 @@ module RubyInstaller
Rubinius = OpenStruct.new(
:version => "1.0.1-20100603",
:url => "http://asset.rubini.us",
+ :checkout => 'https://github.com/evanphx/rubinius.git',
+ :branch => 'multiverse',
+ :checkout_target => 'downloads/rbx',
:target => 'sandbox/rbx',
:install_target => 'sandbox/rbx_mingw',
:configure_options => [
View
17 recipes/interpreter/rbx.rake
@@ -21,9 +21,24 @@ namespace(:interpreter) do
task :download => file_target
end
+ task :checkout => "downloads" do
+ cd RubyInstaller::ROOT do
+ # If is there already a checkout, update instead of checkout
+ if File.exist?(File.join(RubyInstaller::ROOT, package.checkout_target, '.git'))
+ Dir.chdir(package.checkout_target) do
+ sh "cmd /c \"git checkout #{package.branch} && git pull\""
+ end
+ else
+ sh "git clone #{package.checkout} #{package.checkout_target} --branch #{package.branch}"
+ end
+ end
+ end
+
task :sources do
case
when ENV['LOCAL']
+ when ENV['CHECKOUT']
+ Rake::Task['interpreter:rbx:checkout'].invoke
else
Rake::Task['interpreter:rbx:download'].invoke
end
@@ -33,6 +48,8 @@ namespace(:interpreter) do
case
when ENV['LOCAL']
package.target = File.expand_path(File.join(ENV['LOCAL'], '.'))
+ when ENV['CHECKOUT']
+ package.target = File.expand_path(package.checkout_target)
else
# grab the files from the download task
files = Rake::Task['interpreter:rbx:download'].prerequisites
Please sign in to comment.
Something went wrong with that request. Please try again.