Skip to content

Commit

Permalink
[GR-18163] Use the common.json from truffleruby to find out the mx ve…
Browse files Browse the repository at this point in the history
…rsion

PullRequest: truffleruby/4140
  • Loading branch information
eregon committed Jan 30, 2024
2 parents 42e6710 + 10eb73a commit 61d3ada
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tool/jt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ def graal_common_json
"#{GRAAL_DIR}/common.json"
end

def truffleruby_common_json
"#{TRUFFLERUBY_DIR}/common.json"
end

def jvmci_version
@jvmci_version ||= begin
sforceimports unless File.directory?(GRAAL_DIR)
Expand Down Expand Up @@ -219,9 +223,9 @@ def find_mx
if which('mx')
'mx'
else
common_json = File.read(graal_common_json)
common_json = File.read(truffleruby_common_json)
regex = /"mx_version":\s*"([^"]+)"/
raise "mx version not found in #{graal_common_json}" unless regex =~ common_json
raise "mx version not found in #{truffleruby_common_json}" unless regex =~ common_json
mx_version = $1
mx_repo = find_or_clone_repo('https://github.com/graalvm/mx.git', mx_version)
"#{mx_repo}/mx"
Expand Down

0 comments on commit 61d3ada

Please sign in to comment.