Skip to content

Commit

Permalink
Clean up m files from the bossapi before packaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
pablorcum committed Jun 26, 2024
1 parent ce0b1b9 commit 68618e4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
16 changes: 16 additions & 0 deletions buildUtilities/cleanupMfiles.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
function cleanupMfiles(rootFolder)

arguments
rootFolder {mustBeFolder}
end

% Get a list of all .m files recursively
fileList = dir(fullfile(rootFolder, '**/*.m'));

% Delete each .m file
for i = 1:length(fileList)
filePath = fullfile(fileList(i).folder, fileList(i).name);
delete(filePath);
end

end
7 changes: 6 additions & 1 deletion buildfile.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,14 @@
"toolbox/dependencies/+bossapi","toolbox/dependencies/+bossapi",...
Description = "pcode bossapi");

plan("cleanupMfiles") = Task( ...
Description = "Clean up m-files after pcoding", ...
Actions = @(~) cleanupMfiles("toolbox/dependencies/+bossapi"),...
Dependencies = "pcodeBossapi");

plan("package") = Task( ...
Description = "Package toolbox", ...
Dependencies = ["check" "updateSGdeps" "test" "buildDoc" "pcodeBossapi"], ...
Dependencies = ["check" "updateSGdeps" "test" "buildDoc" "pcodeBossapi" "cleanupMfiles"], ...
Actions = @(~,toolboxVer,authorName) releaseTask(toolboxVer,authorName));

% Set default tasks in the plan
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" ?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design"></Label>
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" ?>
<Info location="cleanupMfiles.m" type="File"></Info>

0 comments on commit 68618e4

Please sign in to comment.