Skip to content

Commit a770f1a

Browse files
committed
[Truffle] JT: Implement jt build truffle.
1 parent 5ffb663 commit a770f1a

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

tool/jt.rb

+18-3
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ module Commands
8989

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

117-
def build
118-
mvn 'package'
118+
def build(project = nil)
119+
case project
120+
when 'truffle'
121+
mvn '-pl', 'truffle', 'package'
122+
when nil
123+
mvn 'package'
124+
else
125+
raise ArgumentError, project
126+
end
119127
end
120128

121129
def clean
@@ -251,7 +259,14 @@ def main(args)
251259
exit
252260
end
253261

254-
send args.shift if %w[build rebuild].include? args.first
262+
case args.first
263+
when "rebuild"
264+
send(args.shift)
265+
when "build"
266+
command = [args.shift]
267+
command << args.shift if args.first == "truffle"
268+
send(*command)
269+
end
255270

256271
return if args.empty?
257272

0 commit comments

Comments
 (0)