Navigation Menu

Skip to content

Commit

Permalink
[Truffle] JT: Implement jt build truffle.
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Feb 18, 2015
1 parent 5ffb663 commit a770f1a
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions tool/jt.rb
Expand Up @@ -89,6 +89,7 @@ module Commands

def help
puts 'jt build build'
puts 'jt build truffle build only the Truffle part, assumes the rest is up-to-date'
puts 'jt clean clean'
puts 'jt rebuild clean and build'
puts 'jt run [options] args... run JRuby with -X+T and args'
Expand All @@ -114,8 +115,15 @@ def help
puts 'you can also put build or rebuild in front of any command'
end

def build
mvn 'package'
def build(project = nil)
case project
when 'truffle'
mvn '-pl', 'truffle', 'package'
when nil
mvn 'package'
else
raise ArgumentError, project
end
end

def clean
Expand Down Expand Up @@ -251,7 +259,14 @@ def main(args)
exit
end

send args.shift if %w[build rebuild].include? args.first
case args.first
when "rebuild"
send(args.shift)
when "build"
command = [args.shift]
command << args.shift if args.first == "truffle"
send(*command)
end

return if args.empty?

Expand Down

0 comments on commit a770f1a

Please sign in to comment.