Skip to content

Commit

Permalink
chore: Remove ruby-version from 0.71 (#36423)
Browse files Browse the repository at this point in the history
* chore: Remove ruby-version from 0.71

* Update Gemfile

* Update Gemfile

---------

Co-authored-by: Riccardo Cipolleschi <cipolleschi@fb.com>
  • Loading branch information
cipolleschi and Riccardo Cipolleschi committed Mar 10, 2023
1 parent e0d92c6 commit 1d22e29
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 29 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ package-lock.json
# Ruby Gems (Bundler)
/vendor
/template/vendor
.ruby-version
/**/.ruby-version

# iOS / CocoaPods
/template/ios/build/
Expand Down
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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'
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 1 addition & 21 deletions scripts/update-ruby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
4 changes: 2 additions & 2 deletions template/Gemfile
Original file line number Diff line number Diff line change
@@ -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'
1 change: 0 additions & 1 deletion template/_ruby-version

This file was deleted.

0 comments on commit 1d22e29

Please sign in to comment.