/
version.m
66 lines (52 loc) · 1.67 KB
/
version.m
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
function varargout = version
% Return version number of the zapit package as a whole
%
% out = zapit.version
%
% Purpose
% Return version number of the zapit package as a whole.
% Versions are semantic, meaning MAJOR.MINOR.PATCH
% and are incremented as follows:
% * MAJOR version when you make incompatible API changes
% * MINOR version when you add functionality in a backwards compatible manner
% * PATCH version when you make backwards compatible bug fixes
%
% Patch number will not always be updated. e.g. in the case of minor
% documentation commits and so forth.
%
% Inputs
% none
%
% Outputs
% out - optional structure containing the version number in numeric and string formats
% plus the date of last update and information on the current Git commit.
% If no output asked, version printed to screen.
%
%
% Rob Campbell - SWC 2022
%% EDIT THE FOLLOWING TO INCREMENT THE VERSION
out.version.MAJOR = 0;
out.version.MINOR = 10;
out.version.PATCH = 3;
%% Since v0.10.0 (2023/02/01) the preReleaseString will likely remain empty.
out.version.preReleaseString = '';
%%% UPDATE THE DATE
out.date.year = 2023;
out.date.month = 2;
out.date.day = 2;
out.version.string = sprintf('%d.%d.%d%s', ...
out.version.MAJOR, ...
out.version.MINOR, ...
out.version.PATCH,...
out.version.preReleaseString);
out.gitInfo = zapit.updater.getGitInfo;
out.message = sprintf('Zapit version %s -- %d/%d/%d', ...
out.version.string, ...
out.date.year, ...
out.date.month, ...
out.date.day);
if nargout>0
varargout{1} = out;
else
fprintf('%s\n', out.message)
end