Skip to content

Commit

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

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

fbshipit-source-id: bd23d6d73001d0b58bf6b0321ed6d4ceb3523e7a
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Oct 5, 2023
1 parent ed9931f commit 9fee990
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 9fee990

Please sign in to comment.