Skip to content

Commit 68618e4

Browse files
committed
Clean up m files from the bossapi before packaging.
1 parent ce0b1b9 commit 68618e4

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

buildUtilities/cleanupMfiles.m

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
function cleanupMfiles(rootFolder)
2+
3+
arguments
4+
rootFolder {mustBeFolder}
5+
end
6+
7+
% Get a list of all .m files recursively
8+
fileList = dir(fullfile(rootFolder, '**/*.m'));
9+
10+
% Delete each .m file
11+
for i = 1:length(fileList)
12+
filePath = fullfile(fileList(i).folder, fileList(i).name);
13+
delete(filePath);
14+
end
15+
16+
end

buildfile.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@
3737
"toolbox/dependencies/+bossapi","toolbox/dependencies/+bossapi",...
3838
Description = "pcode bossapi");
3939

40+
plan("cleanupMfiles") = Task( ...
41+
Description = "Clean up m-files after pcoding", ...
42+
Actions = @(~) cleanupMfiles("toolbox/dependencies/+bossapi"),...
43+
Dependencies = "pcodeBossapi");
44+
4045
plan("package") = Task( ...
4146
Description = "Package toolbox", ...
42-
Dependencies = ["check" "updateSGdeps" "test" "buildDoc" "pcodeBossapi"], ...
47+
Dependencies = ["check" "updateSGdeps" "test" "buildDoc" "pcodeBossapi" "cleanupMfiles"], ...
4348
Actions = @(~,toolboxVer,authorName) releaseTask(toolboxVer,authorName));
4449

4550
% Set default tasks in the plan
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" ?>
2+
<Info>
3+
<Category UUID="FileClassCategory">
4+
<Label UUID="design"></Label>
5+
</Category>
6+
</Info>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" ?>
2+
<Info location="cleanupMfiles.m" type="File"></Info>

0 commit comments

Comments
 (0)