2021-09-23 18:25:47 +03:00
|
|
|
#!/bin/bash
|
2021-12-31 02:08:43 +03:00
|
|
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
2021-09-23 18:25:47 +03:00
|
|
|
#
|
|
|
|
# This source code is licensed under the MIT license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
|
|
|
|
# This script updates RNTester Podfile.lock after verifying the CocoaPods environment.
|
|
|
|
# Usage:
|
|
|
|
# source scripts/update_podfile_lock && update_pods
|
|
|
|
|
2022-02-22 13:17:47 +03:00
|
|
|
THIS_DIR=$(cd -P "$(dirname "$(realpath "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
|
2021-09-23 18:25:47 +03:00
|
|
|
RNTESTER_DIR="$THIS_DIR/../packages/rn-tester"
|
|
|
|
|
2021-10-02 07:21:03 +03:00
|
|
|
# Keep this separate for FB internal access.
|
2021-09-23 18:25:47 +03:00
|
|
|
validate_env () {
|
2021-10-02 07:21:03 +03:00
|
|
|
cd "$RNTESTER_DIR" || exit
|
|
|
|
bundle check || exit
|
|
|
|
cd "$THIS_DIR" || exit
|
2021-09-23 18:25:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
update_pods () {
|
|
|
|
cd "$RNTESTER_DIR" || exit
|
2021-10-02 07:21:03 +03:00
|
|
|
bundle check || exit
|
|
|
|
bundle exec pod install
|
2021-09-23 18:25:47 +03:00
|
|
|
cd "$THIS_DIR" || exit
|
|
|
|
}
|