Skip to content

Commit 586f84b

Browse files
committed
[GR-18163] Use the mx version from common.json in GitHub Actions
PullRequest: truffleruby/4134
2 parents 60cc362 + f25445f commit 586f84b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tool/jt.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,11 @@ def find_mx
219219
if which('mx')
220220
'mx'
221221
else
222-
mx_repo = find_or_clone_repo('https://github.com/graalvm/mx.git')
222+
common_json = File.read(graal_common_json)
223+
regex = /"mx_version":\s*"([^"]+)"/
224+
raise "mx version not found in #{graal_common_json}" unless regex =~ common_json
225+
mx_version = $1
226+
mx_repo = find_or_clone_repo('https://github.com/graalvm/mx.git', mx_version)
223227
"#{mx_repo}/mx"
224228
end
225229
end

0 commit comments

Comments
 (0)