From 1d22e291462ac452f2bb6b1b6af11986944ec54a Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 10 Mar 2023 10:54:41 +0000 Subject: [PATCH] chore: Remove ruby-version from 0.71 (#36423) * chore: Remove ruby-version from 0.71 * Update Gemfile * Update Gemfile --------- Co-authored-by: Riccardo Cipolleschi --- .gitignore | 2 ++ .ruby-version | 1 - Gemfile | 4 ++-- Gemfile.lock | 4 ++-- scripts/update-ruby.sh | 22 +--------------------- template/Gemfile | 4 ++-- template/_ruby-version | 1 - 7 files changed, 9 insertions(+), 29 deletions(-) delete mode 100644 .ruby-version delete mode 100644 template/_ruby-version diff --git a/.gitignore b/.gitignore index 01027b3802aef0..412c19bb992309 100644 --- a/.gitignore +++ b/.gitignore @@ -99,6 +99,8 @@ package-lock.json # Ruby Gems (Bundler) /vendor /template/vendor +.ruby-version +/**/.ruby-version # iOS / CocoaPods /template/ios/build/ diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index 49cdd668e1c82b..00000000000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.7.6 diff --git a/Gemfile b/Gemfile index 567e59805c4a73..1142b1b209ae3a 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby File.read(File.join(__dir__, '.ruby-version')).strip +ruby '>= 2.6.10' -gem 'cocoapods', '~> 1.11', '>= 1.11.3' +gem 'cocoapods', '>= 1.11.3' diff --git a/Gemfile.lock b/Gemfile.lock index 470fb1ef3e2c33..2b013d0b13706d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -89,10 +89,10 @@ PLATFORMS ruby DEPENDENCIES - cocoapods (~> 1.11, >= 1.11.3) + cocoapods (~> 1.12) RUBY VERSION ruby 2.7.6p219 BUNDLED WITH - 2.3.22 + 2.1.4 diff --git a/scripts/update-ruby.sh b/scripts/update-ruby.sh index 2e8f39bb74be45..cb9c20b392ceb5 100755 --- a/scripts/update-ruby.sh +++ b/scripts/update-ruby.sh @@ -32,23 +32,6 @@ fi if [ -z "$VERSION" ]; then die "Please provide an installed/usable Ruby version" fi -echo "Setting Ruby version to: $VERSION" - -cd "$ROOT" || die "Failed to change to $ROOT" - -# do this first, so rbenv/rvm will automatically pick the desired version -echo "$VERSION" > .ruby-version - -# make sure we're using it -CURRENT_VERSION=$(ruby --version | cut -d' ' -f2 | cut -dp -f1) -if [ -z "$CURRENT_VERSION" ]; then - # rbenv/rvm uses shims, the commands do exist, but do not return a version if misconfigured - die "Missing usable ruby, check your installation" -elif [ "$VERSION" != "$CURRENT_VERSION" ]; then - die "Plese use the ruby version you are trying to set: $VERSION ('$CURRENT_VERSION' in use)" -fi - -echo "$VERSION" > template/_ruby-version rm -f Gemfile.lock @@ -62,10 +45,7 @@ export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; IS_GIT_REPO=$(git rev-parse --is-inside-work-tree 2> /dev/null || true) export GIT_DISCOVERY_ACROSS_FILESYSTEM=0; if [ "$IS_GIT_REPO" = "true" ]; then - git add \ - .ruby-version \ - Gemfile.lock \ - template/_ruby-version + git add Gemfile.lock else echo "Detected that you're not in Git. If on another SCM, don't forget to commit the edited files." fi diff --git a/template/Gemfile b/template/Gemfile index 567e59805c4a73..1142b1b209ae3a 100644 --- a/template/Gemfile +++ b/template/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby File.read(File.join(__dir__, '.ruby-version')).strip +ruby '>= 2.6.10' -gem 'cocoapods', '~> 1.11', '>= 1.11.3' +gem 'cocoapods', '>= 1.11.3' diff --git a/template/_ruby-version b/template/_ruby-version deleted file mode 100644 index 49cdd668e1c82b..00000000000000 --- a/template/_ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.7.6