From 0575fcfdb1dea65063b61b5d6f04fa1524972432 Mon Sep 17 00:00:00 2001 From: Andrew Coates Date: Tue, 18 Aug 2020 14:40:39 -0700 Subject: [PATCH] Ensure final dir is present during publishing --- .ado/npmOfficePack.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.ado/npmOfficePack.js b/.ado/npmOfficePack.js index d6a01f47aa..999e319124 100644 --- a/.ado/npmOfficePack.js +++ b/.ado/npmOfficePack.js @@ -40,7 +40,13 @@ function doPublish(fakeMode) { const npmTarFileName = `react-native-${releaseVersion}.tgz`; const npmTarPath = path.resolve(__dirname, '..', npmTarFileName); - const finalTarPath = path.join(process.env.BUILD_STAGINGDIRECTORY, 'final', npmTarFileName); + const finalTarDir = path.join(process.env.BUILD_STAGINGDIRECTORY, 'final'); + const finalTarPath = path.join(finalTarDir, npmTarFileName); + + if (!fs.existsSync(finalTarDir)) { + fs.mkdirSync(finalTarDir); + } + console.log(`Copying tar file ${npmTarPath} to: ${finalTarPath}`) if(fakeMode) {