Skip to content

Commit 4446a0e

Browse files
committed
update plugins path
1 parent 2db8abe commit 4446a0e

4 files changed

Lines changed: 7 additions & 10 deletions

File tree

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/buildtool.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
// Copyright 2022-2024 The MathWorks, Inc.
2-
import * as path from "path";
32

43
export interface RunBuildOptions {
54
Tasks?: string;
65
BuildOptions?: string;
76
}
87

98
export function generateCommand(options: RunBuildOptions): string {
10-
const pluginsPath = path.join(__dirname,"plugins").replaceAll("'","''");
11-
let command: string = "addpath('"+ pluginsPath +"'); buildtool"
9+
let command: string = "buildtool"
1210
if (options.Tasks) {
1311
command = command + " " + options.Tasks;
1412
}

src/buildtool.unit.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
// Copyright 2022-2024 The MathWorks, Inc.
22

3-
import * as path from "path";
43
import * as buildtool from "./buildtool";
54

65
describe("command generation", () => {
7-
const command = "addpath('"+ path.join(__dirname, "plugins").replaceAll("'","''") +"'); buildtool"
86
it("buildtool invocation with unspecified tasks and build options", () => {
97
const options: buildtool.RunBuildOptions = {
108
Tasks: "",
119
BuildOptions: "",
1210
};
1311

1412
const actual = buildtool.generateCommand(options);
15-
expect(actual).toBe(command)
13+
expect(actual).toBe("buildtool")
1614
});
1715

1816
it("buildtool invocation with tasks specified", () => {
@@ -21,7 +19,7 @@ const command = "addpath('"+ path.join(__dirname, "plugins").replaceAll("'","''"
2119
};
2220

2321
const actual = buildtool.generateCommand(options);
24-
expect(actual).toBe(command + " compile test")
22+
expect(actual).toBe("buildtool compile test")
2523
});
2624

2725
it("buildtool invocation with only build options", () => {
@@ -31,7 +29,7 @@ const command = "addpath('"+ path.join(__dirname, "plugins").replaceAll("'","''"
3129
};
3230

3331
const actual = buildtool.generateCommand(options);
34-
expect(actual).toBe(command + " -continueOnFailure -skip check")
32+
expect(actual).toBe("buildtool -continueOnFailure -skip check")
3533
});
3634

3735
it("buildtool invocation with specified tasks and build options", () => {
@@ -41,6 +39,6 @@ const command = "addpath('"+ path.join(__dirname, "plugins").replaceAll("'","''"
4139
};
4240

4341
const actual = buildtool.generateCommand(options);
44-
expect(actual).toBe(command + " compile test -continueOnFailure -skip check")
42+
expect(actual).toBe("buildtool compile test -continueOnFailure -skip check")
4543
});
4644
});

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ async function run() {
2727
const execOptions = {
2828
env: {
2929
...process.env,
30+
MW_BATCH_LICENSING_ONLINE:'true', // Remove when online batch licensing is the default
3031
"MW_MATLAB_BUILDTOOL_DEFAULT_PLUGINS_FCN_OVERRIDE": "buildframework.getDefaultPlugins",
3132
}
3233
};

0 commit comments

Comments
 (0)