From e78e3fd4a468716c86d497187f08b719c667fad0 Mon Sep 17 00:00:00 2001 From: Isla Li Date: Fri, 14 Jun 2024 13:59:04 -0700 Subject: [PATCH] issue-21: update checkVersion to return nothing --- onc/+util/checkVersion.m | 5 +---- onc/Onc.m | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/onc/+util/checkVersion.m b/onc/+util/checkVersion.m index 07a156e..bf1b554 100644 --- a/onc/+util/checkVersion.m +++ b/onc/+util/checkVersion.m @@ -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); @@ -25,8 +24,6 @@ link = sprintf('How to update this library', 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 diff --git a/onc/Onc.m b/onc/Onc.m index 02cf49d..63ce061 100644 --- a/onc/Onc.m +++ b/onc/Onc.m @@ -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 @@ -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