From e9aba2efb66361ffe16be1a210dc347058b169af Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 8 Oct 2019 10:00:38 +0100 Subject: [PATCH] Require and provide portable Ruby 2.6.3. --- Library/Homebrew/brew.sh | 2 +- Library/Homebrew/cmd/vendor-install.sh | 12 ++++++------ Library/Homebrew/extend/os/mac/diagnostic.rb | 6 +----- Library/Homebrew/utils/ruby.sh | 4 +++- Library/Homebrew/vendor/portable-ruby-version | 2 +- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index bf3e6c8410..51c3d763f9 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -133,7 +133,7 @@ then # Set a variable when the macOS system Ruby is new enough to avoid spawning # a Ruby process unnecessarily. - if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "101303" ]] + if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "101500" ]] then unset HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH else diff --git a/Library/Homebrew/cmd/vendor-install.sh b/Library/Homebrew/cmd/vendor-install.sh index 98b246cc16..68bb0c62ca 100644 --- a/Library/Homebrew/cmd/vendor-install.sh +++ b/Library/Homebrew/cmd/vendor-install.sh @@ -17,17 +17,17 @@ if [[ -n "$HOMEBREW_MACOS" ]] then if [[ "$HOMEBREW_PROCESSOR" = "Intel" ]] then - ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.3.7.mavericks.bottle.tar.gz" - ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.7/portable-ruby-2.3.7.mavericks.bottle.tar.gz" - ruby_SHA="539ae571968fc74d4ec3a839cb33edc5786c219a5e6ae7fb6a09ec5fc1b04e4e" + ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby--2.6.3.mavericks.bottle.tar.gz" + ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3/portable-ruby--2.6.3.mavericks.bottle.tar.gz" + ruby_SHA="ab81211a2052ccaa6d050741c433b728d0641523d8742eef23a5b450811e5104" fi elif [[ -n "$HOMEBREW_LINUX" ]] then case "$HOMEBREW_PROCESSOR" in x86_64) - ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.3.7.x86_64_linux.bottle.tar.gz" - ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.7/portable-ruby-2.3.7.x86_64_linux.bottle.tar.gz" - ruby_SHA="9df214085a0e566a580eea3dd9eab14a2a94930ff74fbf97fb1284e905c8921d" + ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby--2.6.3.x86_64_linux.bottle.tar.gz" + ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3/portable-ruby--2.6.3.x86_64_linux.bottle.tar.gz" + ruby_SHA="e8c9b6d3dc5f40844e07b4b694897b8b7cb5a7dab1013b3b8712a22868f98c98" ;; aarch64) ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.3.7.aarch64_linux.bottle.tar.gz" diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index 3116255fa2..caf672790b 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -139,11 +139,7 @@ module Homebrew end def check_ruby_version - ruby_version = if MacOS.version >= :catalina - "2.6.3" - else - "2.3.7" - end + ruby_version = "2.6.3" return if RUBY_VERSION == ruby_version return if ARGV.homebrew_developer? && OS::Mac.prerelease? diff --git a/Library/Homebrew/utils/ruby.sh b/Library/Homebrew/utils/ruby.sh index e47c9df9fa..822ddd2789 100644 --- a/Library/Homebrew/utils/ruby.sh +++ b/Library/Homebrew/utils/ruby.sh @@ -3,7 +3,9 @@ setup-ruby-path() { local vendor_ruby_current_version local vendor_ruby_path local ruby_version_new_enough - local minimum_ruby_version="2.3.7" + # When bumping check if HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH (in brew.sh) + # also needs to be changed. + local minimum_ruby_version="2.6.3" vendor_dir="$HOMEBREW_LIBRARY/Homebrew/vendor" vendor_ruby_current_version="$vendor_dir/portable-ruby/current" diff --git a/Library/Homebrew/vendor/portable-ruby-version b/Library/Homebrew/vendor/portable-ruby-version index 00355e29d1..ec1cf33c3f 100644 --- a/Library/Homebrew/vendor/portable-ruby-version +++ b/Library/Homebrew/vendor/portable-ruby-version @@ -1 +1 @@ -2.3.7 +2.6.3