From 0a5f7e4e932d8ae0a407d3fba3d8a6d5adf2969a Mon Sep 17 00:00:00 2001 From: Mounir Dhahri Date: Wed, 5 Feb 2025 16:55:20 +0100 Subject: [PATCH] feat: use npx pod-install #RFC (#11473) * feat: use npx pod-install * chore: add pod-install to dev deps --- .circleci/config.yml | 2 +- docs/setting_up_eigen_after_long_time.md | 2 +- docs/troubleshooting.md | 1 - package.json | 4 ++-- scripts/utils/doctor.js | 4 ++-- scripts/utils/flip-table | 2 -- yarn.lock | 5 +++++ 7 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6ba42b1b283..5e051fc0a4e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -91,7 +91,7 @@ commands: - v29-pods-{{ checksum ".manifests/cocoapods" }} - run: name: Install Pods - command: cd ios; bundle exec pod check --ignore-dev-pods || bundle exec pod install; cd ..; + command: cd ios; bundle exec pod check --ignore-dev-pods || bundle exec npx pod-install; cd ..; - save_cache: key: v29-pods-{{ checksum ".manifests/cocoapods" }} paths: diff --git a/docs/setting_up_eigen_after_long_time.md b/docs/setting_up_eigen_after_long_time.md index ad6bc408526..c65fa38ca28 100644 --- a/docs/setting_up_eigen_after_long_time.md +++ b/docs/setting_up_eigen_after_long_time.md @@ -19,7 +19,7 @@ You might encounter some Pod errors, i.e.: in that case, you can try to run the following commands: ```sh -cd ios && bundle exec pod repo update && bundle exec pod install +cd ios && bundle exec npx pod-install ``` This will update the stale pods on your local environment. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 61e777293b9..bb24f4130c0 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -7,7 +7,6 @@ If things are not going right some of the things you can try are - `yarn setup:artsy` - `yarn install:all` - `yarn relay` -- `yarn pod-install-repo-update` - `open ios/Artsy.xcworkspace` -> Product -> Clean Build Folder (shift + command + K) **then** build the app again - `yarn doctor` diff --git a/package.json b/package.json index 6bd821008f9..1d7d01eacb0 100644 --- a/package.json +++ b/package.json @@ -58,8 +58,7 @@ "open-sim": "open -a Simulator", "open-url": "npx uri-scheme open", "open-xcode": "open ios/Artsy.xcworkspace", - "pod-install": "cd ios; bundle exec pod install; cd ..; ./scripts/setup/post-pod-install.rb", - "pod-install-repo-update": "cd ios; bundle exec pod install --repo-update; cd ..; ./scripts/setup/post-pod-install.rb", + "pod-install": "cd ios; bundle exec npx pod-install; cd ..; ./scripts/setup/post-pod-install.rb", "postinstall": "react-native setup-ios-permissions; yarn init-metaflags; prettier --write package.json; ./scripts/setup/update-echo", "prepare": "patch-package && husky install", "prettier-project": "yarn run prettier-write 'src/**/*.{ts,tsx}'", @@ -298,6 +297,7 @@ "lint-staged": "13.2.3", "ora": "5.4.0", "patch-package": "6.4.7", + "pod-install": "0.3.4", "postinstall-prepare": "1.0.1", "prettier": "3.1.1", "prompt-sync": "4.2.0", diff --git a/scripts/utils/doctor.js b/scripts/utils/doctor.js index c38cdbe62f5..94568dad9ef 100755 --- a/scripts/utils/doctor.js +++ b/scripts/utils/doctor.js @@ -195,7 +195,7 @@ const checkPodDependenciesAreUpToDate = async () => { } else { NO( `Your ${r`pod dependencies`} are out of sync.`, - `Run ${g`bundle exec pod install`} in the iOS directory.` + `Run ${g`bundle exec npx pod-install`} in the iOS directory.` ) } } @@ -205,7 +205,7 @@ const checkPodDependenciesAreUpToDate = async () => { } else { NO( `Your ${r`pod dependencies`} are out of sync.`, - `Run ${g`bundle exec pod install`} in the iOS directory.` + `Run ${g`bundle exec npx pod-install`} in the iOS directory.` ) } } catch (error) { diff --git a/scripts/utils/flip-table b/scripts/utils/flip-table index 0a3b5dec0de..dcda2c0f91d 100755 --- a/scripts/utils/flip-table +++ b/scripts/utils/flip-table @@ -58,5 +58,3 @@ echo 'Reinstall dependencies ┬─┬ノ( º _ ºノ)' yarn install:all ./scripts/setup/update-echo - -yarn pod-install-repo-update diff --git a/yarn.lock b/yarn.lock index b159243c9a2..c94ca92c292 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12740,6 +12740,11 @@ plist@^3.0.4: base64-js "^1.5.1" xmlbuilder "^15.1.1" +pod-install@0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/pod-install/-/pod-install-0.3.4.tgz#8d6ad22a3e42d8014ee0363378d4bd782b8152d5" + integrity sha512-I6ObV36HNvbM5/QI8IEZ61ot41p8eBB9Zm0Bc9Sw99v9JzdNvwxg6IS2ZbZbJ0KvLWnUCIL1mIiFhJTLVF5r1w== + popmotion@11.0.3: version "11.0.3" resolved "https://registry.yarnpkg.com/popmotion/-/popmotion-11.0.3.tgz#565c5f6590bbcddab7a33a074bb2ba97e24b0cc9"