nextver
A library for parsing and incrementing arbitrarily-formatted versions.
Instead of conforming to a specific versioning scheme, this library allows you to define your own version format, parse version strings against it, and increment versions according to semantic and/or calendar rules.
**See the docs here: https://docs.rs/nextver
Examples
Below, the text in [brackets] is a specifier. See what they mean here.
// quickly get a next version
use *;
let next = next.unwrap;
assert_eq!;
let next = next.unwrap;
assert_eq!;
// or, break down the steps for reusability
use *;
let format = new_format;
let version = parse.unwrap;
let next = version.next.unwrap;
assert!;
Jump to the specifiers table here.
CLI
nextver also comes with a CLI tool, nextver, which can be used to quickly increment versions.
Install it with cargo:
Then, run it:
# 1.3.0
Then, run it with nextver --help to see the available options.
Possible Improvements
- Support optional suffixed data, such as pre-release or build metadata.