Skip to content
Merged
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
19 changes: 19 additions & 0 deletions packages/react-native-executorch/scripts/create-package.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
#!/bin/bash

# Phonemis is a git submodule whose sources the podspec compiles directly
# (see third-party/common/phonemis/src in react-native-executorch.podspec).
# Init it explicitly so the files are present in the packed tarball.
# Run from repo root so the submodule path resolves regardless of cwd.
git -C "$(git rev-parse --show-toplevel)" submodule update --init --recursive \
packages/react-native-executorch/third-party/common/phonemis

# Trim phonemis to what consumers need at build time. Done here (not via
# package.json "files") because the submodule's own .gitignore has
# `!scripts/build*` which npm-packlist honors and re-includes those files
# despite our exclusion rules. Restore on exit so the working tree stays clean.
PHONEMIS_DIR="third-party/common/phonemis"
restore_phonemis() {
git -C "$PHONEMIS_DIR" checkout -- data test scripts requirements.txt 2>/dev/null || true
}
trap restore_phonemis EXIT
rm -rf "$PHONEMIS_DIR/data" "$PHONEMIS_DIR/test" "$PHONEMIS_DIR/scripts"
rm -f "$PHONEMIS_DIR/requirements.txt"

yarn install --immutable

if [ $# -ge 1 ] && [ "$1" = "generate_nightly_version" ]; then
Expand Down
Loading