nexus-cli
nexus-cli copied to clipboard
For the -keep option, is it possible to do a numeric sort?
Great tool. Nice to be able to delete images from the nexus registry from the comand line. Is it possible to do a numeric (ie. version) sort when using the --keep option.
For example when I list the tags of an image I get:
- 1.0.1
- 1.0.11
- 1.0.4
- latest There are 4 images for repository xx
Then do the -keep 2 option, I get:
- 1.0.4
- latest
Would like to keep the last 2 versions:
- 1.0.11
- latest
I can imagine that won't work with the current implementation, as the
Sorta old question, but I just sent a PR fixing this: https://github.com/mlabouardy/nexus-cli/pull/16 Maybe you could use my fork, until it gets merged.