When I try to use the Mendix SDK on a branch the changes in the script are comitted to the main line. Is this a bug? I'm using the code:
const username = process.argv[2];
const apikey = process.argv[3];
const projectId = process.argv[4];
const projectName = process.argv[5];
const moduleName = process.argv[6];
const pageName = process.argv[7];
let branchName = null; // null for mainline
if (process.argv[8]){
branchName = process.argv[8];
}
let revNo = -1; // -1 for latest
if (process.argv[9]){
revNo = process.argv[9];
}
const client = new MendixSdkClient(username, apikey);
const project = new Project(client, projectId, projectName);
client.platform().createOnlineWorkingCopy(project, new Revision(revNo, new Branch(project, branchName)))
.then(workingCopy => loadDomainModel(workingCopy))
.then(workingCopy => {
...
})
.then(workingCopy => workingCopy.commit())
.done(
revision => console.log(`Successfully committed revision: ${revision.num() }. Done.`),
error => {
console.log('Something went wrong:');
console.dir(error);
});
(I also tried setting branchName hardcoded)