diff --git a/ToolboxPackaging.prj b/ToolboxPackaging.prj
index f776777..0dabd46 100644
--- a/ToolboxPackaging.prj
+++ b/ToolboxPackaging.prj
@@ -7,7 +7,7 @@
MATLAB(R) Tools to access the Climate Data Store (https://cds.climate.copernicus.eu/)
MATLAB Tools to access the Climate Data Store (https://cds.climate.copernicus.eu/). It is a wealth of information about the Earth's past, present and future climate. There are hundreds of data sets associated with climate change. See the GettingStarted.mlx in the doc directory!
${PROJECT_ROOT}\img\ToolboxPackaging.jpg
- 2.2.1.42
+ 2.2.2.45
${PROJECT_ROOT}\Climate Data Store Toolbox for MATLAB.mltbx
diff --git a/buildutil/packageToolbox.m b/buildutil/packageToolbox.m
index 2e386b3..a816055 100644
--- a/buildutil/packageToolbox.m
+++ b/buildutil/packageToolbox.m
@@ -12,7 +12,7 @@
% packageTookbox('specific',versionString) VERSIONSTRING is a string containing
% the specific 3 part semantic version (i.e. "2.3.4") to use.
-% Copyright 2022 The MathWorks, Inc.
+% Copyright 2023 The MathWorks, Inc.
arguments
releaseType {mustBeTextScalar,mustBeMember(releaseType,["build","major","minor","patch","specific"])} = "build"
versionString {mustBeTextScalar} = "";
@@ -25,16 +25,25 @@
if tbxPackagingProjectFile == ""
error("releaseToolbox:NoTbxPrjFound","No Toolbox Packaging Project found.")
end
+
+ % GitHub issue #11. Toolbox packaging from GitHub action does not put /util and /doc on the path.
+ previouspath = addpath(fullfile(pwd,"climatedatastoreToolbox","util"),...
+ fullfile(pwd,"climatedatastoreToolbox","doc"));
+
newVersion = updateMLTBXVersion(tbxPackagingProjectFile,releaseType, versionString);
matlab.addons.toolbox.packageToolbox(tbxPackagingProjectFile);
+
+ % Revert path changes
+ path(previouspath);
+
mltbxFile = findMLTBXFile(pwd);
% Replace spaces with underscores to be GitHub friendly and move to releases directory
- [path,filename,ext] = fileparts(mltbxFile);
+ [filepath,filename,ext] = fileparts(mltbxFile);
newMltbxFilename = strrep(filename," ","_");
if isempty(dir(outputDirectory))
mkdir(outputDirectory)
end
- movefile(mltbxFile,fullfile(path,outputDirectory,newMltbxFilename+ext));
+ movefile(mltbxFile,fullfile(filepath,outputDirectory,newMltbxFilename+ext));
function tbxPackagingProjectFilename = findTBXPackagingProjectFile(directoryToSearch)
% Unfortunately, Toolbox Packaging Projects and MATLAB projects both use the