diff --git a/scripts/publish-npm.js b/scripts/publish-npm.js index 1ee22e34b3..32a0b782a8 100755 --- a/scripts/publish-npm.js +++ b/scripts/publish-npm.js @@ -43,15 +43,11 @@ const { publishAndroidArtifactsToMaven, } = require('./release-utils'); const fs = require('fs'); -const os = require('os'); const path = require('path'); const yargs = require('yargs'); const buildTag = process.env.CIRCLE_TAG; const otp = process.env.NPM_CONFIG_OTP; -const tmpPublishingFolder = fs.mkdtempSync( - path.join(os.tmpdir(), 'rn-publish-'), -); const argv = yargs .option('n', { @@ -81,10 +77,6 @@ const buildType = releaseBuild ? 'nightly' : 'dry-run'; -if (!argv.help) { - echo(`The temp publishing folder is ${tmpPublishingFolder}`); -} - // 34c034298dc9cad5a4553964a5a324450fda0385 const currentCommit = getCurrentCommit(); const shortCommit = currentCommit.slice(0, 9); @@ -138,7 +130,7 @@ if (isCommitly) { } } -generateAndroidArtifacts(releaseVersion, tmpPublishingFolder); +generateAndroidArtifacts(releaseVersion); // Write version number to the build folder const releaseVersionFile = path.join('build', '.version'); diff --git a/scripts/release-utils.js b/scripts/release-utils.js index 9d7cb17a0b..661b55f464 100644 --- a/scripts/release-utils.js +++ b/scripts/release-utils.js @@ -12,7 +12,7 @@ const {exec, echo, exit, test, env, pushd, popd} = require('shelljs'); const {createHermesPrebuiltArtifactsTarball} = require('./hermes/hermes-utils'); -function generateAndroidArtifacts(releaseVersion, tmpPublishingFolder) { +function generateAndroidArtifacts(releaseVersion) { // -------- Generating Android Artifacts echo('Generating Android artifacts inside /tmp/maven-local'); if (exec('./gradlew publishAllToMavenTempLocal').code) { diff --git a/scripts/test-e2e-local.js b/scripts/test-e2e-local.js index 03605481c6..6ade2825b6 100644 --- a/scripts/test-e2e-local.js +++ b/scripts/test-e2e-local.js @@ -19,8 +19,6 @@ const {exec, exit, pushd, popd, pwd, cd, cp} = require('shelljs'); const yargs = require('yargs'); const fs = require('fs'); -const path = require('path'); -const os = require('os'); const {getBranchName} = require('./scm-utils'); const { @@ -31,7 +29,6 @@ const { const { generateAndroidArtifacts, - saveFilesToRestore, generateiOSArtifacts, } = require('./release-utils'); @@ -146,12 +143,6 @@ if (argv.target === 'RNTester') { // create the local npm package to feed the CLI // base setup required (specular to publish-npm.js) - const tmpPublishingFolder = fs.mkdtempSync( - path.join(os.tmpdir(), 'rn-publish-'), - ); - console.info(`The temp publishing folder is ${tmpPublishingFolder}`); - - saveFilesToRestore(tmpPublishingFolder); // we need to add the unique timestamp to avoid npm/yarn to use some local caches const baseVersion = require('../package.json').version; @@ -176,7 +167,7 @@ if (argv.target === 'RNTester') { ).code; // Generate native files for Android - generateAndroidArtifacts(releaseVersion, tmpPublishingFolder); + generateAndroidArtifacts(releaseVersion); // Setting up generating native iOS (will be done later) const repoRoot = pwd(); @@ -249,9 +240,6 @@ if (argv.target === 'RNTester') { exec('yarn android'); } popd(); - - // just cleaning up the temp folder, the rest is done by the test clean script - exec(`rm -rf ${tmpPublishingFolder}`); } exit(0);