Skip to content

Commit

Permalink
Update Contents.m automatically with version and date data.
Browse files Browse the repository at this point in the history
  • Loading branch information
pablorcum committed Jul 26, 2024
1 parent 1a8777c commit 0997e44
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions buildUtilities/releaseTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
projObj = currentProject;

% Remove v from toolboxVersion
options.toolboxVersion = erase(toolboxVersion,"v");
toolboxVersion = erase(toolboxVersion,"v");

% Toolbox Parameter Configuration
toolboxOptions = matlab.addons.toolbox.ToolboxOptions(fullfile(projObj.RootFolder,"toolbox"), "71e8748d-9f0b-4242-b8f1-1d61b60aa4dc");

toolboxOptions.ToolboxName = "BOSSdevice API Toolbox";
toolboxOptions.ToolboxVersion = options.toolboxVersion;
toolboxOptions.ToolboxVersion = toolboxVersion;
toolboxOptions.Summary = projObj.Description;
toolboxOptions.Description = "For a more detailed description refer to the toolbox README.md file. ↵↵ Contact email: [email protected]";
toolboxOptions.AuthorName = authorName;
Expand All @@ -37,6 +37,15 @@
toolboxOptions.SupportedPlatforms.MatlabOnline = false;
toolboxOptions.SupportedPlatforms.Win64 = true;

% Update Contents.m
contentsFilepath = fullfile(projObj.RootFolder,"toolbox","Contents.m");
toolboxContent = fileread(contentsFilepath);
toolboxContent = regexprep(toolboxContent, '\<dev\>', char(toolboxVersion));
toolboxContent = regexprep(toolboxContent, '\<today\>', char(datetime('now', 'Format', 'dd-MMM-yyyy')));
fid = fopen(contentsFilepath, 'w');
fwrite(fid, toolboxContent);
fclose(fid);

% Required Additional Software
% TODO: Automate download and installation of bossdevice firmware. DownloadURL must point to a ZIP file (MLDATX firmware fiel) in the downloads section of sync2brain
% toolboxOptions.RequiredAdditionalSoftware = ...
Expand Down

0 comments on commit 0997e44

Please sign in to comment.