From 22aec0ab621edf195101ca37ad3de69e0dbd710c Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 5 Oct 2023 05:32:17 -0700 Subject: [PATCH] Remove unneeded write to .version file (#39807) Summary: We used to need this file so that we could read the react native version when [creating Hermes artifacts](https://github.com/facebook/react-native/commit/e4b5d3eec9bae44c46795c4be097b31cb48593ae#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R1507). Originally, that change was introduced [here](https://github.com/facebook/react-native/commit/e4b5d3eec9bae44c46795c4be097b31cb48593ae#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47) Despite the fact that that approach was wrong, as we already have the right version in the package.json which is guaranteed to be present, a lot has changed since then and we don't need that file anymore. ## Changelog: [Internal] - Remove lines that write a .version file while releasing on npm Reviewed By: lunaleaps Differential Revision: D49909718 --- scripts/publish-npm.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/publish-npm.js b/scripts/publish-npm.js index 7fb72bc557fb4b..1c78f5bd3b9c86 100755 --- a/scripts/publish-npm.js +++ b/scripts/publish-npm.js @@ -81,10 +81,6 @@ function publishNpm(buildType) { generateAndroidArtifacts(version); - // Write version number to the build folder - const versionFile = path.join('build', '.version'); - fs.writeFileSync(versionFile, version); - if (buildType === 'dry-run') { echo('Skipping `npm publish` because --dry-run is set.'); return exit(0);