omni
omni copied to clipboard
`up`: only upgrade resource versions if `--upgrade` is passed as parameter
Most versions don't need to be upgraded for each omni up, and only a base version is required.
We should thus by default avoid upgrading versions all the time if a version exists and is usable for the existing constraints.
For instance, python: 3 should work for any version greater or equal to 3.0.0 of python. Of course, it should install the latest version available when none is available, but if version 3.0.1 is installed already, even if it's not the latest, it should directly be used unless --upgrade is specifically passed to indicate we want, as part of omni up, to upgrade all versions.
This logic could apply to:
- any
asdf-backed operation - any
github-releaseoperation -
homebrewand similar (no need to try and update the tool if already installed, unless--upgradeis passed)
This would mean:
- Adding support for
omni up --upgradeparameter, which would trigger the current behavior of upgrading everything - Adding support for an
upgradeparameter tohomebrew(installandtap),asdf-backed operations andgithub-release, which if set totruewould behave as if--upgradeis always passed but only for the specific entry - Adding support for each
asdf-backed andgithub-releaseoperations that a fresh install, outside of--upgrade, could simply use the latest-compatible-already-installed version of the tool instead of installing a new version - Handle
latestversions to act as if it matches any somewhat latest version of the tool; this would allow to keep making sure we don't install an obsolete version, but that we allow for any somewhat-latest version to work and not require the very latest version each time- e.g. if the latest version is 3.4.5, then
latestwould behave as if3was passed as parameter - Or maybe it could allow the last minor to stay somewhat closer to the latest
- Or maybe this could be provided as a configuration option that each user can decide how
latestshould behave outside ofupgrademode
- e.g. if the latest version is 3.4.5, then