Skip to content

Commit

Permalink
Remove unneeded write to .version file (#39807)
Browse files Browse the repository at this point in the history
Summary:

We used to need this file so that we could read the react native version when [creating Hermes artifacts](e4b5d3e#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R1507). Originally, that change was introduced [here](e4b5d3e#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
  • Loading branch information
Riccardo Cipolleschi authored and facebook-github-bot committed Oct 5, 2023
1 parent ce39931 commit 22aec0a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions scripts/publish-npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 22aec0a

Please sign in to comment.