Skip to content

Fix marketplace release automation #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/jsActions/mobile-resources-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"testProject": {
"githubUrl": "https://github.com/mendix/native-mobile-resources",
"branchName": "main"
"branchName": "mx/10.17.x"
},
"scripts": {
"prestart": "rimraf ./dist/tsc",
Expand Down Expand Up @@ -54,4 +54,4 @@
"rimraf": "^4.4.1",
"rollup": "^2.79.2"
}
}
}
2 changes: 1 addition & 1 deletion packages/jsActions/nanoflow-actions-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"testProject": {
"githubUrl": "https://github.com/mendix/native-mobile-resources",
"branchName": "main"
"branchName": "mx/10.17.x"
},
"scripts": {
"start": "rollup --config ../../../configs/jsactions/rollup.config.js --watch --configProject nanoflowcommons",
Expand Down
4 changes: 2 additions & 2 deletions scripts/release/createNativeModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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([
Expand Down
4 changes: 2 additions & 2 deletions scripts/release/module-automation/commons.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Loading