From 888202e82ff9d4cff7f7e482714b537752755435 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Fri, 28 Apr 2023 15:12:52 +0200 Subject: [PATCH] Add TruffleRuby+GraalVM 23.0.0-preview1 --- bin/ruby-build | 4 +++- script/update-truffleruby-graalvm | 9 ++++++-- .../truffleruby+graalvm-23.0.0-preview1 | 21 +++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 share/ruby-build/truffleruby+graalvm-23.0.0-preview1 diff --git a/bin/ruby-build b/bin/ruby-build index a6f727df05..af5e0d4e99 100755 --- a/bin/ruby-build +++ b/bin/ruby-build @@ -777,7 +777,9 @@ build_package_truffleruby_graalvm() { cd Contents/Home || return $? fi - bin/gu install ruby || return $? + if [ -e bin/gu ]; then + bin/gu install ruby || return $? + fi local ruby_home ruby_home=$(bin/ruby -e 'print RbConfig::CONFIG["prefix"]') diff --git a/script/update-truffleruby-graalvm b/script/update-truffleruby-graalvm index 6142f17ec2..ac86d28d68 100755 --- a/script/update-truffleruby-graalvm +++ b/script/update-truffleruby-graalvm @@ -14,8 +14,13 @@ file="share/ruby-build/truffleruby+graalvm-${version}" add_platform() { platform="$1" - basename="graalvm-ce-java17-${platform}-${version}.tar.gz" - url="https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/${basename}" + if [[ "$version" = *preview* ]]; then + basename="graalvm-ruby-community-${version}-jdk17-${platform}.tar.gz" + url="https://github.com/oracle/truffleruby/releases/download/vm-${version}/${basename}" + else + basename="graalvm-ce-java17-${platform}-${version}.tar.gz" + url="https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/${basename}" + fi sha256=$(sha256sum "$release_directory/$basename" | cut -d ' ' -f 1) cat >> "$file" <