Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
robzr committed Feb 26, 2024
1 parent 3112a84 commit 08a3770
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ criteria for a core formula, it will be added! This requires more than 75 stars,
### Command line usage
See `sver help` for documentation.
```text
sver v1.0.0 (https://github.com/robzr/sver) self contained cli tool and function
sver v1.1.0-pre1 (https://github.com/robzr/sver) self contained cli tool and function
library implementing a Semantic Versioning 2 compliant parser and utilities.
Written in optimized, portable, pure Bash (v3)+ for simplicity & speed.
Usage: sver <command> [<sub_command>] [<version>] [<constraint>]
Usage: sver <command> [<sub_command>] [<version>|<option> ...]
Commands:
bump major <version>
Expand All @@ -68,7 +68,7 @@ Commands:
constraint <version> <constraint(s)> -- version constraint evaluation - if
version matches constraint(s) ? exit 0 : exit 1
equals <version1> <version2> -- version1 == version2 ? exit 0 : exit 1
filter -- filters stdin list, returns only valid SemVers
filter [filter] -- filters stdin list, returns only valid SemVers
greater_than <version1> <version2> -- version1 > version2 ? exit 0 : exit 1
get major <version>
get minor <version>
Expand All @@ -78,7 +78,9 @@ Commands:
help
json <version> -- displays JSON map of components
less_than <version1> <version2> -- version1 < version2 ? 0 : exit 1
sort -- sorts stdin list of SemVers
max [filter] -- returns max value from stdin list
min [filter] -- returns min value from stdin list
sort [-r] [filter] -- sorts stdin list of SemVers (-r for reverse sort)
validate <version> -- version is valid ? exit 0 : exit 1
version
yaml <version> -- displays YAML map of components
Expand All @@ -87,10 +89,14 @@ Versions:
Semantic Versioning 2 (https://semver.org) compliant versions, with an
optional "v" prefix tolerated on input.
Filters:
Some commands take an optional <filter> argument, which is a version substring
that any output must match. Examples: "filter v5.0", "sort v1", "min v1.2.3-"
Constraints:
Version constraint supports the following operators. Multiple comma-delimited
constraints can be used. Abbreviated version substrings can be used, and are
especially useful with pessimistic constraint.
constraints can be used. Version substrings can be used, and are especially
useful with pessimistic constraint.
= <version_substring> -- equal
> <version_substring> -- greater than
>= <version_substring> -- greater than or equal to
Expand Down Expand Up @@ -135,8 +141,3 @@ sed -n '/# bash-only-begin/,/# bash-only-end/!p' sver > sver.dash
# License
Permissive [Creative Commons - CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
license - same as Semantic Versioning itself.

# TODO
- fix constraint version substring behavior to consider specified identifiers
- add unit testing for constraints
- finish dash functionality

0 comments on commit 08a3770

Please sign in to comment.