Newer
Older
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
function [upToDate, message] = checkInterim(pArtoaWorkspace)
%CHECKINTERIMVERSION Summary of this function goes here
% Detailed explanation goes here
%% Initialize return variables
upToDate = true;
message = '';
%% Check if the stored version is the most recent one
currentArtoaVersion = str2num(artoa.versioning.getVersionString(true));
maxMigration = artoa.versioning.migrations.getLatestVersionNumber();
if ~isfield(pArtoaWorkspace, 'artoaVersion')
message = [ ...
'You loaded an iterim file with an unknown Version.' newline ...
'Your artoa4 instance is on Version 4.' num2str(currentArtoaVersion) '.' newline ...
'Please consider upgrading your interim file using the' newline newline ...
'artoa.versioning.migrations.apply(yourArtoaFilePath)' newline newline ...
'command.' newline ...
'Artoa might be unstable otherwise!'
];
upToDate = false;
return;
end
workspaceVersion = str2num(pArtoaWorkspace.artoaVersion(2:end));
if workspaceVersion < currentArtoaVersion & workspaceVersion < maxMigration
message = [ ...
'You loaded an iterim file that has Version 4.' ...
num2str(workspaceVersion) ...
'.' newline ...
'Your artoa4 instance is on Version 4.' num2str(currentArtoaVersion) '.' newline ...
'Please consider upgrading your interim file using the' newline newline ...
'artoa.versioning.migrations.apply(yourArtoaFilePath)' newline newline ...
'command.' newline ...
'Artoa might be unstable otherwise!'
];
upToDate = false;
else
end