Skip to content

Commit

Permalink
issue-21: update checkVersion to return nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
IslaL committed Jun 14, 2024
1 parent f0465f7 commit e78e3fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 1 addition & 4 deletions onc/+util/checkVersion.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
function isLatestVersion = checkVersion()
function checkVersion()
url = 'https://github.com/OceanNetworksCanada/api-matlab-client/releases/latest';
isLatestVersion = 0;
try
% get latest version
releaseInfo = webread(url);
Expand All @@ -25,8 +24,6 @@
link = sprintf('<a href="%s">How to update this library</a>', formattedPath);
warning(['You are using an outdated version(%s) of the library. Update to the latest version(%s) to avoid potential errors. ' ...
'For instructions on updating to the latest version, please visit: %s'], localVersion, latestVersion, link);
else
isLatestVersion = 1;
end
catch ME
% do nothing
Expand Down
5 changes: 2 additions & 3 deletions onc/Onc.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
classdef Onc < onc.OncDiscovery & onc.OncDelivery & onc.OncRealTime & onc.OncArchive
%% ONC Facilitates access to Ocean Networks Canada's data through the Oceans 3.0 API.
% For detailed information and usage examples, run doc command or visit MATLAB's help browser
% then find Ocean Networks Canada API Client under supplemental software
% For detailed information and usage examples, run 'doc Ocean Networks Canada API Client Toolbox' command
%
% ONC Properties:
% token - User token, can be obtained at: https://data.oceannetworks.ca/Profile
Expand Down Expand Up @@ -143,7 +142,7 @@
%providing the locationCodes

% check if it's running the latest version. If not, throw a warning
util.checkVersion;
util.checkVersion();

end

Expand Down

0 comments on commit e78e3fd

Please sign in to comment.