mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
chore: Remove ruby-version from 0.69 (#36433)
Co-authored-by: Riccardo Cipolleschi <cipolleschi@fb.com>
This commit is contained in:
co-authored by
Riccardo Cipolleschi
parent
124bb11ecd
commit
4e015c69d6
+1
-26
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user