Skip to content

Commit

Permalink
Extract default_ruby_version and update 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jan 31, 2024
1 parent 124e491 commit 4126def
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ def default_ubuntu_version(ruby_version)
end
end

def default_ruby_version
ENV['ruby_version'] || '3.3.0'
end

def ubuntu_version(ruby_version)
ENV.fetch("ubuntu_version", default_ubuntu_version(ruby_version))
end
Expand Down Expand Up @@ -176,7 +180,7 @@ namespace :docker do
end

task :build do
ruby_version = ENV['ruby_version'] || '2.6.1'
ruby_version = default_ruby_version
unless ruby_version_exist?(ruby_version)
abort "unknown ruby version: #{ruby_version}"
end
Expand Down

0 comments on commit 4126def

Please sign in to comment.