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()
22%> url = pm.lib.update.weblink(silent)
27%> \include{lineno} example/
lib/update/
weblink/main.m
29%> \include{lineno} example/
lib/update/
weblink/main.out.m
34%> \JoshuaOsborne, May 21 2024, 7:54 PM, University of Texas at Arlington<br>
35%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
36%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
46 currentVersionString = pm.lib.version();
47 latestVersionString = pm.lib.update.version(silent);
48 if latestVersionString ==
""
51 +
"Failed to capture the latest ParaMonte MATLAB library version the project repository." + newline ...
52 +
"If you believe this behavior is unexpected, please report this issue at: " + newline ...
54 + pm.io.tab + pm.web.href(
weblinks.github.issues.url) + newline ...
60 currentVersionTriplet = pm.str.split2real(currentVersionString);
61 latestVersionTriplet = pm.str.split2real(latestVersionString);
62 if all(currentVersionTriplet == latestVersionTriplet)
64 disp(
"You seem to have the latest version of the ParaMonte MATLAB library!");
67 updateAvailable = (latestVersionTriplet(1) > currentVersionTriplet(1)) ...
68 || (latestVersionTriplet(1) == currentVersionTriplet(1) && latestVersionTriplet(2) > currentVersionTriplet(2)) ...
69 || (latestVersionTriplet(1) == currentVersionTriplet(1) && latestVersionTriplet(2) == currentVersionTriplet(2) && latestVersionTriplet(3) > currentVersionTriplet(3));
71 url =
weblinks.github.releases.latest.url +
"/libparamonte_matlab_" + pm.os.namel();
75 url = url + ".tar.gz";
79 + "A newer ParaMonte MATLAB library
version (" + latestVersionString + ") is " + newline ...
80 + "available on GitHub or is in preparation for
release. " + newline ...
81 + "The currently-installed
version on your system is: " + currentVersionString + newline ...
82 + "You can download the latest
version of the ParaMonte MATLAB library from " + newline ...
84 + pm.io.
tab + pm.web.
href(url) + newline ...
91 + "Looks like you have a
version of the ParaMonte MATLAB library (" + currentVersionString + ") " + newline ...
92 + "that is newer than the most recent
release version (" + latestVersionString + ")." + newline ...
93 + "Get in
touch with us at:" + newline ...
97 + "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...