Files
react-native/packages/react-native/scripts/packager.sh
T
Riccardo Cipolleschi a45d346823 Fixed script for Packager.sh in RNTester (#36582)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36582

This change should fix the path to run packager.sh directly from Xcode, this was broken after the Monorepo work.

## Changelog:
[internal] - update path to run packager.sh

Reviewed By: huntie, hoxyq

Differential Revision: D44292167

fbshipit-source-id: 90e0291aa7a15189c72cae99c5d38c84c7243a80
2023-03-23 10:46:25 -07:00

20 lines
751 B
Bash
Executable File

#!/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.
# scripts directory
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
REACT_NATIVE_ROOT="$THIS_DIR/.."
# Application root directory - General use case: react-native is a dependency
PROJECT_ROOT=${PROJECT_ROOT:-"$THIS_DIR/../../.."}
# check and assign NODE_BINARY env
# shellcheck disable=SC1090
source "${THIS_DIR}/node-binary.sh"
# Start packager from PROJECT_ROOT
cd "$PROJECT_ROOT" || exit
"$NODE_BINARY" "$REACT_NATIVE_ROOT/cli.js" start --custom-log-reporter-path "$THIS_DIR/packager-reporter.js" "$@"