diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-01-12 20:57:52 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-01-12 20:57:52 +0900 |
commit | f0440d3ff68a6ff0db0ca0f9572d1250109039b1 (patch) | |
tree | fd92ae63fc3eee81247dd09c926362014aafcdfc /lib/tasks | |
parent | 1fb6fef94f96b0c693b1014ffdc95b3ef4cfc9c4 (diff) | |
download | poe-f0440d3ff68a6ff0db0ca0f9572d1250109039b1.tar.gz |
add Compiler.version_long
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/compiler.rake | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/tasks/compiler.rake b/lib/tasks/compiler.rake index 214d7f3..30b4de1 100644 --- a/lib/tasks/compiler.rake +++ b/lib/tasks/compiler.rake @@ -6,7 +6,9 @@ namespace :compiler do RUBIES = { "2.3.0" => "https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.gz", "2.2.4" => "https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.4.tar.gz", + "2.2.3" => "https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz", "2.1.8" => "https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.8.tar.gz", + "2.0.0-p648" => "https://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p648.tar.gz", } desc "Install a ruby" task :ruby, :version @@ -27,7 +29,10 @@ namespace :compiler do system("make -j6") or raise("failed to make") system("make install DESTDIR=#{destdir.to_s}") or raise("failed to install") - Compiler.create!(language: "ruby", version: args[:version], command_line: "#{prefix}/bin/ruby PROGRAM") + Compiler.create!(language: "ruby", + version: args[:version], + version_long: `#{destdir}#{prefix}/bin/ruby -v`.lines.first.chomp, + command_line: "#{prefix}/bin/ruby PROGRAM") } } } @@ -56,7 +61,10 @@ namespace :compiler do system("make -j6") or raise("failed to make") system("make install INSTALL_ROOT=#{destdir.to_s}") or raise("failed to install") - Compiler.create!(language: "php", version: args[:version], command_line: "#{prefix}/bin/php PROGRAM") + Compiler.create!(language: "php", + version: args[:version], + version_long: `#{destdir}#{prefix}/bin/php -v`.line.first.chomp, + command_line: "#{prefix}/bin/php PROGRAM") } } } |