Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(ci): fix patch set generation to handle modern react-native / yarn #7792

Merged
merged 4 commits into from
May 14, 2024
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
9 changes: 7 additions & 2 deletions .github/workflows/create_test_patches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ jobs:
command: DETOX_DISABLE_POSTINSTALL=1 yarn && yarn lerna:prepare

- name: Create Patches
env:
# yarn3+ by default disables lockfile alteration in CI. We want it.
YARN_ENABLE_IMMUTABLE_INSTALLS: false
run: |
PACKAGE_LIST=`find packages -maxdepth 1 -mindepth 1 -type d -exec basename {} \; | egrep -v 'template|invites'`
mkdir $HOME/packages
Expand All @@ -71,17 +74,19 @@ jobs:
done
ls -la $HOME/packages/
cd $HOME
npx react-native init template --skip-install
npx react-native init template --skip-install --skip-git-init
cd template
yarn
yarn add patch-package --save-dev
yarn add patch-package --dev
mkdir patches || true
for PACKAGE in $PACKAGE_LIST; do
echo "Installing package $PACKAGE into fresh template app, then clobbering with PR version"
yarn add @react-native-firebase/$PACKAGE || true
if [ -d node_modules/@react-native-firebase/$PACKAGE ]; then
pushd node_modules/@react-native-firebase
tar -zxf $HOME/packages/react-native-firebase-${PACKAGE}.tgz
# yarn3+ pack does not handle the executable bits on our scripts correctly. Fix.
chmod 755 package/ios_config.sh && true
mv $PACKAGE/package.json package/
\rm -fr $PACKAGE
mv package $PACKAGE
Expand Down
Loading