mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove the update-ruby script as it's now unnecessary (#36802)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/36802 As we now support a broader range of ruby version, we don't need `update-ruby.sh` anymore and we also don't need to call it during the set-rn-version script. Changelog: [Internal] [Changed] - Remove the update-ruby script as it's now unnecessary Reviewed By: cipolleschi Differential Revision: D44670361 fbshipit-source-id: b23abab28ccbd27408e4d76670101faeb463bc6b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
58ee6b2f7a
commit
d1174535f7
@@ -149,12 +149,6 @@ if (
|
||||
// Change react-native version in the template's package.json
|
||||
exec(`node scripts/set-rn-template-version.js ${version}`);
|
||||
|
||||
// Make sure to update ruby version
|
||||
if (exec('scripts/update-ruby.sh').code) {
|
||||
echo('Failed to update Ruby version');
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Verify that files changed, we just do a git diff and check how many times version is added across files
|
||||
const filesToValidate = [
|
||||
'packages/react-native/package.json',
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$VERBOSE" = 1 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
case $(sed --help 2>&1) in
|
||||
*GNU*) sed_i () { sed -i "$@"; };;
|
||||
*) sed_i () { sed -i '' "$@"; };;
|
||||
esac
|
||||
|
||||
SCRIPTS="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT="$(dirname "$SCRIPTS")"
|
||||
|
||||
die() {
|
||||
echo "ERROR: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ $# -eq 1 ]; then
|
||||
VERSION=$1
|
||||
else
|
||||
VERSION=$(ruby --version | cut -d' ' -f2 | cut -dp -f1)
|
||||
fi
|
||||
|
||||
if [ -z "$VERSION" ]; then
|
||||
die "Please provide an installed/usable Ruby version"
|
||||
fi
|
||||
|
||||
rm -f Gemfile.lock
|
||||
|
||||
export BUNDLE_APP_CONFIG="$ROOT/.bundle"
|
||||
cp "$BUNDLE_APP_CONFIG/"* packages/react-native/template/_bundle # sync!
|
||||
|
||||
bundle lock
|
||||
|
||||
# Disabling getting a potential fatal exit with for crossing filesystem boundary
|
||||
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 Gemfile.lock
|
||||
else
|
||||
echo "Detected that you're not in Git. If on another SCM, don't forget to commit the edited files."
|
||||
fi
|
||||
Reference in New Issue
Block a user