-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Contents.m automatically with version and date data.
- Loading branch information
Showing
1 changed file
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
@@ -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 = ... | ||
|