Skip to content

Commit db7d1db

Browse files
committed
Switch the RUBY_SO_SUFFIX when the target version is preview, rc, or dev
Signed-off-by: moznion <[email protected]>
1 parent ee5ceb2 commit db7d1db

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Rakefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@ namespace :docker do
269269
version_info = get_ruby_version_at_commit(commit_hash)
270270
ruby_so_suffix = version_info.values_at(:MAJOR, :MINOR, :TEENY).join(".")
271271
build_args << "RUBY_SO_SUFFIX=#{ruby_so_suffix}"
272+
elsif ruby_version.match?(/\A\d+\.\d+\.\d+-(preview|rc|dev)\d*\z/)
273+
# For preview, rc, and dev versions, extract just the numeric version
274+
# e.g., "4.0.0-preview2" -> "4.0.0"
275+
ruby_so_suffix = ruby_version.match(/\A(\d+\.\d+\.\d+)/)[1]
276+
build_args << "RUBY_SO_SUFFIX=#{ruby_so_suffix}"
272277
end
273278
%w(cppflags optflags).each do |name|
274279
build_args << %Q(#{name}=#{ENV[name]}) if ENV.key?(name)

0 commit comments

Comments
 (0)