Remove unneeded write to .version file (#39807)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39807

We used to need this file so that we could read the react native version when [creating Hermes artifacts](e4b5d3eec9 (diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R1507)). Originally, that change was introduced [here](e4b5d3eec9 (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

fbshipit-source-id: bd23d6d73001d0b58bf6b0321ed6d4ceb3523e7a
This commit is contained in:
Riccardo Cipolleschi 2023-10-05 06:29:49 -07:00 коммит произвёл Facebook GitHub Bot
Родитель ed9931f456
Коммит 9fee99040d
1 изменённых файлов: 0 добавлений и 4 удалений

Просмотреть файл

@ -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);