forked from Ades91/ImDecorr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildfile.m
More file actions
26 lines (20 loc) · 747 Bytes
/
buildfile.m
File metadata and controls
26 lines (20 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function plan = buildfile
import matlab.buildtool.tasks.CodeIssuesTask
import matlab.buildtool.tasks.TestTask
% Create a plan from task functions
plan = buildplan(localfunctions);
% Add a task to identify code issues
plan("check") = CodeIssuesTask;
% Add a task to run tests
plan("test") = TestTask;
% Make the "archive" task the default task in the plan
plan.DefaultTasks = "archive";
% Make the "archive" task dependent on the "check" and "test" tasks
plan("archive").Dependencies = ["check" "test"];
end
function archiveTask(~)
% Create ZIP file
filename = "source_" + ...
string(datetime("now",Format="yyyyMMdd'T'HHmmss"));
zip(filename,"*")
end