Skip to content

Commit

Permalink
fix(ios): copy iOS NotifeeCore library more carefully during build
Browse files Browse the repository at this point in the history
there was the possibility on certain OSes (Ubuntu-22 it seems) that
bash would copy into sub-directories with casual usage of paths

now the copy is definitely to an absolute path and won't create erroneous
nested directories regardless of initial state

also it will print what it's copying, for later verification
  • Loading branch information
mikehardy committed Dec 17, 2024
1 parent ab9e3d0 commit 68f230f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions build_ios_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ set -eo pipefail

WORKING_DIR=$(pwd)
POD_NAME="NotifeeCore"
POD_PATH="${WORKING_DIR}/ios/${POD_NAME}/"
POD_OUTPUT_FOLDER=${WORKING_DIR}/packages/react-native/ios/NotifeeCore/
POD_PATH="${WORKING_DIR}/ios/${POD_NAME}"
POD_OUTPUT_FOLDER_BASE=${WORKING_DIR}/packages/react-native/ios

rm -rf "${POD_OUTPUT_FOLDER}"
echo "Deleted ${POD_OUTPUT_FOLDER}"
mkdir "${POD_OUTPUT_FOLDER}"
echo "Created ${POD_OUTPUT_FOLDER}"
rm -rf "${POD_OUTPUT_FOLDER_BASE:?}/${POD_NAME}"
echo "Deleted ${POD_OUTPUT_FOLDER_BASE:?}/${POD_NAME}"

# - Copy the core pod
echo "Moving core into packages/react-native submodule"
cp -rp "${POD_PATH}" "${POD_OUTPUT_FOLDER}"
cp -rvp "${POD_PATH}" "${POD_OUTPUT_FOLDER_BASE}/"

0 comments on commit 68f230f

Please sign in to comment.