Skip to content

Commit 3af86ef

Browse files
committed
Revert "Don't need to cleanup m-files manually."
This reverts commit 9d849dd.
1 parent d5c688d commit 3af86ef

4 files changed

Lines changed: 30 additions & 1 deletion

File tree

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
@@ -35,9 +35,14 @@
3535
"toolbox/dependencies/+bossapi","toolbox/dependencies/+bossapi",...
3636
Description = "pcode bossapi");
3737

38+
plan("cleanupMfiles") = Task( ...
39+
Description = "Clean up m-files after pcoding", ...
40+
Actions = @(~) cleanupMfiles("toolbox/dependencies/+bossapi"),...
41+
Dependencies = "pcodeBossapi");
42+
3843
plan("package") = Task( ...
3944
Description = "Package toolbox", ...
40-
Dependencies = ["check" "updateSGdeps" "test" "buildDoc" "pcodeBossapi"], ...
45+
Dependencies = ["check" "updateSGdeps" "test" "buildDoc" "pcodeBossapi" "cleanupMfiles"], ...
4146
Actions = @(~,toolboxVer,authorName) releaseTask(toolboxVer,authorName));
4247

4348
% 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)