Skip to content

Commit

Permalink
chore: Remove ruby-version from 0.69 (#36433)
Browse files Browse the repository at this point in the history
Co-authored-by: Riccardo Cipolleschi <cipolleschi@fb.com>
  • Loading branch information
cipolleschi and Riccardo Cipolleschi committed Mar 10, 2023
1 parent 124bb11 commit 4e015c6
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 132 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,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 '2.7.5'
ruby '>= 2.6.10'

gem 'cocoapods', '~> 1.11', '>= 1.11.2'
gem 'cocoapods', '>= 1.11.2'
100 changes: 0 additions & 100 deletions Gemfile.lock

This file was deleted.

27 changes: 1 addition & 26 deletions scripts/update-ruby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +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

sed_i -e "s/^\(ruby '\)[^']*\('.*\)$/\1$VERSION\2/" Gemfile
sed_i -e "s/^\(ruby '\)[^']*\('.*\)$/\1$VERSION\2/" template/Gemfile

rm -f Gemfile.lock

Expand All @@ -60,9 +40,4 @@ cp "$BUNDLE_APP_CONFIG/"* template/_bundle # sync!

bundle lock

git add \
.ruby-version \
Gemfile \
Gemfile.lock \
template/_ruby-version \
template/Gemfile
git add Gemfile.lock
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 '2.7.5'
ruby '>= 2.6.10'

gem 'cocoapods', '~> 1.11', '>= 1.11.2'
gem 'cocoapods', '>= 1.11.2'
1 change: 0 additions & 1 deletion template/_ruby-version

This file was deleted.

0 comments on commit 4e015c6

Please sign in to comment.