2%> Return a scalar MATLAB
string containing the download
4%> or
return an empty
string ``
""`` is there is none.
6%> \param[in] silent : The input scalar MATLAB logical.<br>
7%> If ``
true``, all descriptive messages on
8%> the MATLAB command line will be suppressed.<br>
9%> (**optional**,
default = ``
false``)
12%> ``url`` : The output scalar MATLAB
string containing the
weblink to the latest
13%> available
version of the ParaMonte library that is newer than the
14%> existing ParaMonte library
version on the current system.<br>
15%> The output ``url`` will be set to empty
string ``
""``
16%>
if there is no newer
version or the function fails.
21%> url = pm.lib.update.weblink()
26%> \include{lineno} example/
lib/update/
weblink/main.m
28%> \include{lineno} example/
lib/update/
weblink/main.out.m
33%> \JoshuaOsborne, May 21 2024, 7:54 PM, University of Texas at Arlington<br>
34%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
35%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
45 currentVersionString = pm.lib.version();
46 latestVersionString = pm.lib.update.version(silent);
47 if latestVersionString ==
""
50 +
"Failed to capture the latest ParaMonte MATLAB library version the project repository." + newline ...
51 +
"If you believe this behavior is unexpected, please report this issue at: " + newline ...
53 + pm.io.tab + pm.web.href(
weblinks.github.issues.url) + newline ...
59 currentVersionTriplet = pm.str.split2real(currentVersionString);
60 latestVersionTriplet = pm.str.split2real(latestVersionString);
61 if all(currentVersionTriplet == latestVersionTriplet)
63 disp(
"You seem to have the latest version of the ParaMonte MATLAB library!");
66 updateAvailable = (latestVersionTriplet(1) > currentVersionTriplet(1)) ...
67 || (latestVersionTriplet(1) == currentVersionTriplet(1) && latestVersionTriplet(2) > currentVersionTriplet(2)) ...
68 || (latestVersionTriplet(1) == currentVersionTriplet(1) && latestVersionTriplet(2) == currentVersionTriplet(2) && latestVersionTriplet(3) > currentVersionTriplet(3));
70 url =
weblinks.github.releases.latest.url +
"/libparamonte_matlab_" + pm.os.namel();
74 url = url + ".tar.gz";
78 + "A newer ParaMonte MATLAB library
version (" + latestVersionString + ") is " + newline ...
79 + "available on GitHub or is in preparation for
release. " + newline ...
80 + "The currently-installed
version on your system is: " + currentVersionString + newline ...
81 + "You can download the latest
version of the ParaMonte MATLAB library from " + newline ...
83 + pm.io.
tab + pm.web.
href(url) + newline ...
90 + "Looks like you have a
version of the ParaMonte MATLAB library (" + currentVersionString + ") " + newline ...
91 + "that is newer than the most recent
release version (" + latestVersionString + ")." + newline ...
92 + "Get in
touch with us at:" + newline ...
96 + "We need your superpowers!" + newline ...
function version(in silent)
Return a scalar MATLAB string containing the latest available ParaMonte MATLAB version newer than the...
function href(in url)
Return an HTML-style decoration of the input URL if the ParaMonte MATLAB library is used in GUI,...
function lib()
Return a scalar MATLAB string containing the path to the lib directory of the ParaMonte library packa...
function release(in type)
Return a scalar MATLAB string containing the MATLAB release version, year, or season as requested.
function tab()
Return a scalar MATLAB string containing 4 blank characters equivalent to a tab character.
function touch()
Return the contents of the .bash_profile file in the system home folder as a scalar MATLAB string.
function weblink(in silent)
Return a scalar MATLAB string containing the download weblink to latest ParaMonte MATLAB library vers...
function weblinks()
Return a structure containing tree of weblinks for the ParaMonte MATLAB library source file and docum...