From fd0edcec43abc128bd4432790ecac3f1205ac1a1 Mon Sep 17 00:00:00 2001 From: Asaf Korem <55082339+asafkorem@users.noreply.github.com> Date: Mon, 19 Feb 2024 16:44:52 +0200 Subject: [PATCH] Revert "build(fix): patch boost podspec on post-install. (#7829)" (#7850) This reverts commit 857a2b3e14a7d82dd63cf2e232cb7464f0873fe7. --- package.json | 1 - scripts/postinstall.js | 33 --------------------------------- 2 files changed, 34 deletions(-) delete mode 100644 scripts/postinstall.js diff --git a/package.json b/package.json index 295545c011..dc7a54c9e3 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "main": "lib/dist/src/index.js", "typings": "lib/dist/src/index.d.ts", "scripts": { - "postinstall": "node scripts/postinstall.js", "build": "node ./scripts/build", "watch": "node ./scripts/watch", "xcode": "open playground/ios/playground.xcworkspace", diff --git a/scripts/postinstall.js b/scripts/postinstall.js deleted file mode 100644 index 55488f01d4..0000000000 --- a/scripts/postinstall.js +++ /dev/null @@ -1,33 +0,0 @@ -const fs = require('fs'); - -const patchBoostPodspec = () => { - const log = message => console.log(`[POST-INSTALL] ${message}`); - const boostPodspecPath = `${process.cwd()}/node_modules/react-native/third-party-podspecs/boost.podspec`; - const originalUrl = 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2'; - const patchedUrl = 'https://archives.boost.io/release/1.76.0/source/boost_1_76_0.tar.bz2'; - - if (!fs.existsSync(boostPodspecPath)) { - log('boost.podspec does not exist, skipping patch...'); - return; - } - - let boostPodspec = fs.readFileSync(boostPodspecPath, 'utf8'); - - if (!boostPodspec.includes(originalUrl)) { - log('boost.podspec is already patched or the URL is different, skipping patch...'); - return; - } - - log('Applying boost.podspec patch...'); - boostPodspec = boostPodspec.replace(originalUrl, patchedUrl); - fs.writeFileSync(boostPodspecPath, boostPodspec, 'utf8'); -}; - -function patchBoostPodspecIfNeeded() { - if (process.platform === 'darwin') { - console.log('[POST-INSTALL] Running boost.io podspec patch...'); - patchBoostPodspec(); - } -} - -patchBoostPodspecIfNeeded();