Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Versort

A small utility to sort semantic(ish) versions.

Building

Versort can be built and installed like so:

cargo build --release
sudo install -vDm755 target/release/versort -t /usr/bin/

Assuming versort has been built, tests can be run with:

tests/test.sh

Usage

Versort reads newline-delimited versions from stdin.

git ls-remote --tags --refs https://github.com/tox-wtf/vagrant |
    sed 's,.*/,,' | shuf |
    versort
git ls-remote --tags --refs https://github.com/python/cpython |
    sed -e 's,.*/,,' -e 's,^v,,' | shuf |
    versort -i # ignore semvers that couldn't be parsed
git ls-remote --tags --refs https://github.com/tmux/tmux |
    sed -e 's,.*/,,' | shuf |
    versort -c # treat a single char at the end as a counter

About

A small utility to sort semantic(ish) versions

Resources

Stars

Watchers

Forks

Releases

Contributors

Languages