Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use tool versions file to colorize ls --details #212

Merged
merged 1 commit into from Sep 7, 2021

Conversation

justinmayer
Copy link
Owner

Previously, environment Python versions in the list shown by vf ls --details were only considered to be up-to-date (i.e., displayed in green) when a given environment's Python version is greater or equal to the default Python version returned by __vfsupport_get_default_python(). If you have some environments on older but fully-supported Python versions, those would show up in yellow even though they should be considered up-to-date.

With these changes, given a ~/.tool-versions file that contains the following line:

python 3.9.7 3.8.12 3.7.11 3.6.14

… any environment's Python version that matches one of the specified versions will be considered up-to-date and displayed in green.

Previously, environment Python versions in the `vf ls --details` list
were only considered to be up-to-date (i.e., displayed in green) when a
given environment's Python version is greater or equal to the default
Python version returned by `__vfsupport_get_default_python()`. If you
have some environments on older but fully-supported Python versions,
those would show up in yellow even though they should be considered
up-to-date.

With the changes in this commit, given a `~/.tool-versions` file that
contains the following line:

    python 3.9.7 3.8.12 3.7.11 3.6.14

… any environment's Python version that matches one of the specified
versions will be considered up-to-date and displayed in green.
@justinmayer
Copy link
Owner Author

justinmayer commented Sep 7, 2021

As I mentioned previously, I would like to eventually enhance this further by retrieving the most up-to-date supported Python version numbers from some kind of API (e.g., curl https://example.com/python/versions/active/patch) and using that information instead of a manually-updated ~/.tool-versions line entry. Hopefully some day such an API will exist. 🤞

Otherwise, perhaps scraping the Python downloads page is the most realistic approach.

In any case, for now I believe this manual approach will do the job. 💫

@justinmayer justinmayer merged commit b8852ec into main Sep 7, 2021
@justinmayer justinmayer deleted the asdf-tool-versions branch September 7, 2021 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant