Skip to content

Commit

Permalink
Merge pull request #55394 from software-mansion-labs/war-in/improve-a…
Browse files Browse the repository at this point in the history
…pplyPatches

[No QA] Merge patch directories together when applying patches
  • Loading branch information
youssef-lr authored Jan 20, 2025
2 parents 73e7f00 + ea1fbd4 commit bec182c
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 bec182c

Please sign in to comment.