lilydjwg / nvchecker

New version checker for software releases
MIT License
439 stars 70 forks source link

Add direct sort version for cmd #230

Closed Christoph-Raab closed 1 year ago

Christoph-Raab commented 1 year ago

Using cmd could support version sorting as git does.

Nvidia driver from their releases.json contains a number of SemVer releases

$ curl -sSf https://docs.nvidia.com/datacenter/tesla/drivers/releases.json | \
  jq -r '.[] | select(.type == "production branch")' | \
  jq -rs '.[].driver_info[].release_version'
525.105.17
525.85.12
525.60.13
515.105.01
[...]

Would be nice to not have to use additional tools like sort and tail to get the most resent release, like

$ curl -sSf https://docs.nvidia.com/datacenter/tesla/drivers/releases.json | \
  jq -r '.[] | select(.type == "production branch")' | \
  jq -rs '.[].driver_info[].release_version' | \
  sort -V | \
  tail -n 1
525.105.17
lilydjwg commented 1 year ago

You can put the whole command in a cmd source.

Christoph-Raab commented 1 year ago

Yes, I'm aware of that. This is a feature request that cmd supports direct version sorting as github does with use_latest_release or use_latest_tag. Sorry if I didn't make that clear enough.

lilydjwg commented 1 year ago

I don't feel a strong reason to do this. use_latest_release and use_latest_tag don't sort by version. Instead they sort by creation date by GitHub.

Christoph-Raab commented 1 year ago

Ok, closing the issue.