Skip to content

filter, compare, and, and sort semantic version strings

License

Notifications You must be signed in to change notification settings

zairadotsh/semvercmp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

semvercmp WIP

Semvercmp is a composable cli utility for comparing and filtering semantic version strings featuring:

  • filtering versions that are lt, lte, gt, or gte a given value
  • taking the max or min of a list of versions

Installation

WIP

Examples

Maximum

  curl -s https://raw.githubusercontent.com/zairadotsh/semvercmp/refs/heads/main/testdata/raw.txt | semvercmp max
  3

Minimum

  curl -s https://raw.githubusercontent.com/zairadotsh/semvercmp/refs/heads/main/testdata/raw.txt | semvercmp min
  0.1.1

Comparisons

Less than or equal to a version

  curl -s https://raw.githubusercontent.com/zairadotsh/semvercmp/refs/heads/main/testdata/raw.txt | semvercmp lte 1.0
  0.1.1
  0.2.1
  v1

Highest patch of a particular minor version

  curl -s https://raw.githubusercontent.com/zairadotsh/semvercmp/refs/heads/main/testdata/raw.txt | semvercmp gte 1.1 | semvercmp lt 1.2 | semvercmp max
  1.1.2

About

filter, compare, and, and sort semantic version strings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published