Skip to content

Commit

Permalink
make temp dir with patches
Browse files Browse the repository at this point in the history
  • Loading branch information
war-in committed Jan 17, 2025
1 parent f9b0d90 commit ea1fbd4
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions scripts/applyPatches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ function patchPackage {

OS="$(uname)"
if [[ "$OS" == "Darwin" || "$OS" == "Linux" ]]; then
npx patch-package --error-on-fail --color=always
EXIT_CODE=$?
if [[ "$IS_HYBRID_APP_REPO" == "true" && "$NEW_DOT_FLAG" == "false" ]]; then
echo -e "\n${GREEN}Applying HybridApp patches!${NC}"
npx patch-package --patch-dir 'Mobile-Expensify/patches' --error-on-fail --color=always
EXIT_CODE+=$?
TEMP_PATCH_DIR=$(mktemp -d ./tmp-patches-XXX)
cp -r ./patches/* "$TEMP_PATCH_DIR"
cp -r ./Mobile-Expensify/patches/* "$TEMP_PATCH_DIR"

npx patch-package --patch-dir "$TEMP_PATCH_DIR" --error-on-fail --color=always
EXIT_CODE=$?

rm -rf "$TEMP_PATCH_DIR"
else
npx patch-package --error-on-fail --color=always
EXIT_CODE=$?
fi
exit $EXIT_CODE
else
Expand Down

0 comments on commit ea1fbd4

Please sign in to comment.