SemVer Sort / Versions sorting
It project doesn't validate schema, it's more or less similar to the PHP function version_sort
algorithm.
Also, it supports sorting patches like 1.2.3-patch.4
but native SemVer doesn't.
If you use only valid Semantic versions, you may use SemVer app written on NodeJS.
- 0.2.0
- 0.1.0
$ curl -Ls https://raw.github.com/rikby/semversort/master/download | bash
It will create file /usr/local/bin/semversort
.
$ semversort 1.0 1.0-rc 1.0-patch 1.0-alpha
$ semversort $(git tag)
$ echo 1.0 1.0-rc 1.0-patch 1.0-alpha | semversort