Skip to content

Commit

Permalink
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ tool/nailgun/ng
reference.txt
rubyspec_temp
.polyglot.pom.rb
tool/truffle/jruby_truffle_runner/jruby+truffle_runner-*.gem

# binaries
!bin/gem
17 changes: 17 additions & 0 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -206,6 +206,7 @@ def help
puts 'jt findbugs run findbugs'
puts 'jt findbugs report run findbugs and generate an HTML report'
puts 'jt install ..../graal/mx/suite.py install a JRuby distribution into an mx suite'
puts 'jt install-tool install the jruby+truffle tool for working with Ruby gems'
puts
puts 'you can also put build or rebuild in front of any command'
puts
@@ -469,6 +470,22 @@ def install(arg)
raise ArgumentError, kind
end
end

def install_tool
Dir.chdir(JRUBY_DIR) do
Dir.chdir('tool/truffle/jruby_truffle_runner') do
raw_sh('gem', 'build', 'jruby+truffle_runner.gemspec')
raw_sh('gem', 'install', 'jruby+truffle_runner-0.0.1.gem')

begin
system('rbenv', 'rehash')
rescue
end
end
end
end

alias_method :"install-tool", :install_tool
end

class JT

2 comments on commit 16b8aed

@chrisseaton
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pitr-ch ping

@pitr-ch
Copy link
Member

@pitr-ch pitr-ch commented on 16b8aed Sep 7, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, personally I've added alias with absolute path to avoid reinstalling when I make changes in the tool.

Please sign in to comment.