A utility to calculate the level of change and the next semantic version number based on the conventional commits since the last version tag.
[x] Calculate next semantic version number [x] Calculate the level to change for next semantic version number [x] Support basic semantic version components: Major, Minor, and Patch [ ] Support pre-release versions (alpha, beta, rc) [ ] Handle case where no tag is found [ ] Update to release version (removing pre-release identifiers)
Install the CLI using cargo install.
```sh
cargo install nextsv
```
Run in your project directory and check the version
```sh
$ nextsv --version nextsv 0.7.3
```
Running the application provides the level for the next semantic version change.
```sh
$ nextsv [2022-08-03T06:33:54Z INFO nextsv] Calculating the next version level minor
```
Help provides all the options
```sh
$ nextsv -h jerusdp jrussell@jerus.ie Next semantic version calculator
USAGE: nextsv [OPTIONS]
OPTIONS:
-f, --force
```
A clean response of the level to update is reported using the -q flag.
```sh
$ nextsv -q minor
```
This can be used with cargo release
to update and publish a new release.
```sh
cargo release $(nextsv -q)
```
To use the library add the crate to dependencies in the project's Cargo.toml.
```toml
[dependencies] nextsv = "0.7.3"
```