Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions packages/react-native-codegen/scripts/oss/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOUR
set -e
set -u

pushd "$THIS_DIR/../.." >/dev/null
TMP_DIR=$(mktemp -d)
CODEGEN_DIR="$THIS_DIR/../.."

rm -rf "$CODEGEN_DIR/lib" "$CODEGEN_DIR/node_modules"

cp -R "$CODEGEN_DIR/." "$TMP_DIR"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to make sure this is compatible with MacOS or Linux (circle CI etc), let's use rsync if we can

https://github.com/facebook/react-native/blob/master/packages/react-native-codegen/DEFS.bzl#L80


pushd "$TMP_DIR" >/dev/null

yarn install 2> >(grep -v '^warning' 1>&2)
yarn run build
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yarn install already builds the package so avoid building it twice.


popd >/dev/null

mv "$TMP_DIR/lib" "$TMP_DIR/node_modules" "$CODEGEN_DIR"
rm -rf "$TMP_DIR"