From e4bd9e22c23945dbbbcded7a1c4862fd61c6e840 Mon Sep 17 00:00:00 2001 From: Diego Antonelli Date: Wed, 17 May 2023 08:55:57 +0200 Subject: [PATCH] Fix NMR module automation --- scripts/release/createNativeModules.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/release/createNativeModules.js b/scripts/release/createNativeModules.js index 4172a5419..1c464bfe1 100644 --- a/scripts/release/createNativeModules.js +++ b/scripts/release/createNativeModules.js @@ -65,7 +65,13 @@ async function createNativeMobileResourcesModule() { const mpkOutput = await createMPK(tmpFolder, moduleInfo, regex.excludeFiles); await exportModuleWithWidgets(moduleInfo.moduleNameInModeler, mpkOutput, nativeWidgetFolders); await createGithubRelease(moduleInfo, moduleChangelogs, mpkOutput); - await execShellCommand(`rm -rf ${tmpFolder}`); + if (process.env.CI !== "true") { + try { + await execShellCommand(`rm -rf ${tmpFolder}`); + } catch (e) { + console.error("Failed to remove the temporary folder"); + } + } console.log("Done."); } @@ -86,7 +92,13 @@ async function createNanoflowCommonsModule() { await updateNativeComponentsTestProject(moduleInfo, tmpFolder); const mpkOutput = await createMPK(tmpFolder, moduleInfo, regex.excludeFiles); await createGithubRelease(moduleInfo, moduleChangelogs, mpkOutput); - await execShellCommand(`rm -rf ${tmpFolder}`); + if (process.env.CI !== "true") { + try { + await execShellCommand(`rm -rf ${tmpFolder}`); + } catch (e) { + console.error("Failed to remove the temporary folder"); + } + } console.log("Done."); }