Skip to content

Commit 61d3ada

Browse files
committed
[GR-18163] Use the common.json from truffleruby to find out the mx version
PullRequest: truffleruby/4140
2 parents 42e6710 + 10eb73a commit 61d3ada

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tool/jt.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ def graal_common_json
184184
"#{GRAAL_DIR}/common.json"
185185
end
186186

187+
def truffleruby_common_json
188+
"#{TRUFFLERUBY_DIR}/common.json"
189+
end
190+
187191
def jvmci_version
188192
@jvmci_version ||= begin
189193
sforceimports unless File.directory?(GRAAL_DIR)
@@ -219,9 +223,9 @@ def find_mx
219223
if which('mx')
220224
'mx'
221225
else
222-
common_json = File.read(graal_common_json)
226+
common_json = File.read(truffleruby_common_json)
223227
regex = /"mx_version":\s*"([^"]+)"/
224-
raise "mx version not found in #{graal_common_json}" unless regex =~ common_json
228+
raise "mx version not found in #{truffleruby_common_json}" unless regex =~ common_json
225229
mx_version = $1
226230
mx_repo = find_or_clone_repo('https://github.com/graalvm/mx.git', mx_version)
227231
"#{mx_repo}/mx"

0 commit comments

Comments
 (0)