Description
It'd be good to have some command line interfaces to see what's available remotely (similar to nvm ls-remote
) and what's available locally (similar to nvm ls
), and other related functionality.
I have my Docker container publishing on a cron job, and so right now, I just blindly create new containers. This costs me roughly an hour per build to create the containers for a given version and validate them, and while monthly jobs aren't terribly expensive in the cloud, it does add up when you consider the number of Matlab versions we're maintaining containers for.
For example:
$ mpm ls-remote
R2017a
R2017aU1
R2017aU2
R2017aU3
...
R2024b
R2024bU1
$ mpm ls-remote --version R2023b
R2023b
R2023bU1
...
R2023bU#
$ mpm ls-remote --latest
R2017U#
...
R2023bU#
R2024aU#
R2024bU1
$ mpm ls-remote --latest R2024b
R2024bU1
$ mpm ls
R2023bU9
R2024bU1
$ mpm ls R2024b
R2024bU1
$ mpm ls R2025a
R2025a not installed
This would let me install mpm
, check what the latest available version is, and what is installed in the current container.
Additionally, when mpm
supports mpm update
, that would make it really easy to script an update (for environmental management software like Ansible/Chef/SaltStack/etc) with something like:
installedVersion=$(mpm ls $version)
latestVersion=$(mpm ls-remote --latest $version)
if [ $installedVersion != $latestVersion ]
then
mpm update $version
fi