Skip to content

Commit

Permalink
Remove unused saveFilesToRestore function
Browse files Browse the repository at this point in the history
Summary:
The method that would restore these files was removed in facebook#34846. The action performed by `saveFilesToRestore` is no longer necessary (thanks kelset for pointing this out).

Changelog: [internal]

Reviewed By: cortinico

Differential Revision: D41003911

fbshipit-source-id: bbc057ac450e7f134c4664173291ca56c18f1b17
  • Loading branch information
hramos authored and facebook-github-bot committed Nov 4, 2022
1 parent 7211366 commit ad43dec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
3 changes: 0 additions & 3 deletions scripts/publish-npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const {
const {
generateAndroidArtifacts,
publishAndroidArtifactsToMaven,
saveFilesToRestore,
} = require('./release-utils');
const fs = require('fs');
const os = require('os');
Expand Down Expand Up @@ -74,8 +73,6 @@ if (!argv.help) {
echo(`The temp publishing folder is ${tmpPublishingFolder}`);
}

saveFilesToRestore(tmpPublishingFolder);

// 34c034298dc9cad5a4553964a5a324450fda0385
const currentCommit = getCurrentCommit();
const shortCommit = currentCommit.slice(0, 9);
Expand Down
22 changes: 0 additions & 22 deletions scripts/release-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,8 @@
'use strict';

const {exec, echo, exit, test, env, pushd, popd} = require('shelljs');
const {saveFiles} = require('./scm-utils');
const {createHermesPrebuiltArtifactsTarball} = require('./hermes/hermes-utils');

// TODO: we should probably remove this because of this? https://github.com/facebook/react-native/pull/34846
function saveFilesToRestore(tmpPublishingFolder) {
const filesToSaveAndRestore = [
'template/Gemfile',
'template/_ruby-version',
'template/package.json',
'.ruby-version',
'Gemfile.lock',
'Gemfile',
'package.json',
'ReactAndroid/gradle.properties',
'Libraries/Core/ReactNativeVersion.js',
'React/Base/RCTVersion.m',
'ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java',
'ReactCommon/cxxreact/ReactNativeVersion.h',
];

saveFiles(filesToSaveAndRestore, tmpPublishingFolder);
}

function generateAndroidArtifacts(releaseVersion, tmpPublishingFolder) {
// -------- Generating Android Artifacts
echo('Generating Android artifacts inside /tmp/maven-local');
Expand Down Expand Up @@ -136,5 +115,4 @@ module.exports = {
generateAndroidArtifacts,
generateiOSArtifacts,
publishAndroidArtifactsToMaven,
saveFilesToRestore,
};

0 comments on commit ad43dec

Please sign in to comment.