Skip to content

Commit cbb5486

Browse files
authored
Merge pull request #30 from sync2brain/pack_sg
Attach and package Speedgoat dependencies on demand
2 parents 8952b58 + ccc963f commit cbb5486

20 files changed

+29
-22
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
work
22
toolbox/html
3-
toolbox/dependencies/firmware
3+
toolbox/dependencies
44

55
# Autosave files
66
*.asv

buildUtilities/releaseTask.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
warning('Share folder not found. Firmware dependencies will not be packaged in toolbox.');
1818
end
1919

20+
% Update Speedgoat dependencies
21+
updateSGdeps;
22+
2023
% Remove v from toolboxVersion
2124
options.toolboxVersion = erase(toolboxVersion,"v");
2225

buildUtilities/updateSGdeps.m

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,24 @@
22

33
projObj = currentProject;
44
sgToolsPath = fileparts(which('updateSGtools.p','-all'));
5-
sgToolsPath = sgToolsPath{end}; % Speedgoat I/O blockset path is always below the local project
5+
if isstring(sgToolsPath)
6+
sgToolsPath = sgToolsPath{end}; % Speedgoat I/O blockset path is always below the local project
7+
end
68

79
fprintf('Updating Speedgoat dependencies in local project from %s...\n',sgToolsPath);
810

911
sgTools = dir(sgToolsPath);
1012
sgTools = sgTools(~[sgTools.isdir]);
1113

14+
destFolder = fullfile(projObj.RootFolder,'toolbox/dependencies/sg',matlabRelease.Release);
15+
if ~isfolder(destFolder)
16+
mkdir(destFolder);
17+
end
18+
1219
for i = 1:numel(sgTools)
13-
copyfile(fullfile(sgTools(i).folder,sgTools(i).name),...
14-
fullfile(projObj.RootFolder,'toolbox/dependencies/sg/'));
20+
copyfile(fullfile(sgTools(i).folder,sgTools(i).name),destFolder);
1521
end
1622

17-
fprintf('Dependencies updated. Please commit and push changes to Git.\n');
23+
fprintf('Speedgoat dependencies updated in toolbox.\n');
1824

1925
end
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version='1.0' encoding='UTF-8'?>
2-
<Info/>
2+
<Info location=".gitkeep" type="File"/>

resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/MskSURkXF5WinZ-fWKasIhdvxp4p.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.

resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/NdmgVI2224JjgwhiWss8erhgOUEp.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.

resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/c3iALygUc9jUZcnFpmELBkqcD-Ad.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.

resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/c3iALygUc9jUZcnFpmELBkqcD-Ap.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.

resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/o8Dwu5f1Xtp1n1mWGkwWcFVsE_Qd.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)