yq
yq copied to clipboard
Consider adding support for Symbolic Versioning
Please describe your feature request. It would be very helpful to have support for Symbolic Versioning (eg. semver). The exact implementation isn't up to me but a minimum being able to do comparisons would be nice. I think that trying to parse all strings and determine if they are semver would result yq doing things that people don't expect so I think either a flag to enable or a new set of functions for dealing with them would be the way to go.
Describe the solution you'd like If we have data1.yml like:
- 0.9.0
- 0.9.1
- 0.10.0
And we run a command:
yq 'map(. | as_symver) | sort_by(.)'
output would be
- 0.9.0
- 0.9.1
- 0.10.0
instead of
- 0.10.0
- 0.9.0
- 0.9.1
Describe alternatives you've considered Maybe a custom tag would be a better alternative?
Additional context N/A