From cd0d8700d50223bac8fb76ba8e9aea85eec997b0 Mon Sep 17 00:00:00 2001 From: Uraz Akgultan Date: Wed, 16 Aug 2023 14:03:20 +0200 Subject: [PATCH] fix: fix native modules script, update min mx version --- packages/jsActions/mobile-resources-native/package.json | 6 +++--- packages/jsActions/nanoflow-actions-native/package.json | 4 ++-- scripts/release/createNativeModules.js | 4 ++-- scripts/release/module-automation/commons.js | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/jsActions/mobile-resources-native/package.json b/packages/jsActions/mobile-resources-native/package.json index 8b2176d60..ce720e5a8 100644 --- a/packages/jsActions/mobile-resources-native/package.json +++ b/packages/jsActions/mobile-resources-native/package.json @@ -9,12 +9,12 @@ "url": "https://github.com/mendix/native-widgets.git" }, "marketplace": { - "minimumMXVersion": "9.24.0.2965", + "minimumMXVersion": "9.21.0.59661", "marketplaceId": 109513 }, "testProject": { "githubUrl": "https://github.com/mendix/native-mobile-resources", - "branchName": "main" + "branchName": "lts/mx/9.24" }, "scripts": { "prestart": "rimraf ./dist/tsc", @@ -52,4 +52,4 @@ "rimraf": "^2.7.1", "rollup": "^2.68.0" } -} \ No newline at end of file +} diff --git a/packages/jsActions/nanoflow-actions-native/package.json b/packages/jsActions/nanoflow-actions-native/package.json index 43c87d7ca..fc03905cc 100644 --- a/packages/jsActions/nanoflow-actions-native/package.json +++ b/packages/jsActions/nanoflow-actions-native/package.json @@ -9,12 +9,12 @@ "url": "https://github.com/mendix/native-widgets.git" }, "marketplace": { - "minimumMXVersion": "9.24.0.2965", + "minimumMXVersion": "9.21.0.59661", "marketplaceId": 109515 }, "testProject": { "githubUrl": "https://github.com/mendix/native-mobile-resources", - "branchName": "main" + "branchName": "lts/mx/9.24" }, "scripts": { "start": "rollup --config ../../../configs/jsactions/rollup.config.js --watch --configProject nanoflowcommons", diff --git a/scripts/release/createNativeModules.js b/scripts/release/createNativeModules.js index 1c464bfe1..c1a3393a5 100644 --- a/scripts/release/createNativeModules.js +++ b/scripts/release/createNativeModules.js @@ -129,7 +129,7 @@ async function updateNativeComponentsTestProject(moduleInfo, tmpFolder, nativeWi const tmpFolderActions = join(tmpFolder, `javascriptsource/${moduleInfo.moduleFolderNameInModeler}/actions`); console.log("Updating NativeComponentsTestProject..."); - await cloneRepo(moduleInfo.testProjectUrl, tmpFolder); + await cloneRepo(moduleInfo.testProjectUrl, moduleInfo.testProjectBranchName, tmpFolder); console.log("Deleting existing JS Actions from test project..."); await rm(tmpFolderActions, { force: true, recursive: true }); // this is useful to avoid retaining stale dependencies in the test project. @@ -199,7 +199,7 @@ async function updateNativeComponentsTestProjectWithAtlas(moduleInfo, tmpFolder) const tmpFolderNativeStyles = join(tmpFolder, `themesource/${moduleInfo.moduleFolderNameInModeler}`); console.log("Updating NativeComponentsTestProject.."); - await cloneRepo(moduleInfo.testProjectUrl, tmpFolder); + await cloneRepo(moduleInfo.testProjectUrl, moduleInfo.testProjectBranchName, tmpFolder); console.log("Copying Native styling files.."); await Promise.all([ diff --git a/scripts/release/module-automation/commons.js b/scripts/release/module-automation/commons.js index de9e46792..0042a75f0 100644 --- a/scripts/release/module-automation/commons.js +++ b/scripts/release/module-automation/commons.js @@ -207,12 +207,12 @@ async function githubAuthentication(moduleInfo) { await execShellCommand(`echo "${process.env.GH_PAT}" | gh auth login --with-token`); } -async function cloneRepo(githubUrl, localFolder) { +async function cloneRepo(githubUrl, githubBranchName, localFolder) { const githubUrlDomain = githubUrl.replace("https://", ""); const githubUrlAuthenticated = `https://${process.env.GH_USERNAME}:${process.env.GH_PAT}@${githubUrlDomain}`; await rm(localFolder, { recursive: true, force: true }); await mkdir(localFolder, { recursive: true }); - await execShellCommand(`git clone ${githubUrlAuthenticated} ${localFolder}`); + await execShellCommand(`git clone --branch ${githubBranchName} ${githubUrlAuthenticated} ${localFolder}`); await setLocalGitCredentials(localFolder); }