Crates.io | nextsv |
lib.rs | nextsv |
version | 0.12.0 |
source | src |
created_at | 2022-05-22 07:08:20.243747 |
updated_at | 2024-11-09 04:04:27.991429 |
description | Next semantic version calculator |
homepage | |
repository | https://github.com/jerusdp/nextsv |
max_upload_size | |
id | 591064 |
size | 274,472 |
A utility to calculate the level of change and the next semantic version number based on the conventional commits since the last version tag.
Install the CLI using cargo install.
cargo install nextsv
Run in your project directory and check the version
$ nextsv --version
nextsv 0.12.0
Running the application provides the level for the next semantic version change.
$ nextsv
[2022-08-03T06:33:54Z INFO nextsv] Calculating the next version level
minor
Help provides all the options
$ nextsv -h
jerusdp <jrussell@jerus.ie>
Next semantic version calculator
USAGE:
nextsv [OPTIONS]
OPTIONS:
-f, --force <FORCE> Force the calculation of the version number [possible values: major,
minor, patch, first]
-h, --help Print help information
--level Report the level of the version number change
--number Report the version number
-p, --prefix <PREFIX> Prefix string to identify version number tags [default: v]
-q, --quiet Pass many times for less log output
-v, --verbose Pass many times for more log output
-V, --version Print version information
$
A clean response of the level to update is reported using the -q flag.
$ nextsv -q
minor
This can be used with cargo release
to update and publish a new release.
cargo release $(nextsv -q)
Further details on usage scenarios can be found here.
To use the library add the crate to dependencies in the project's Cargo.toml.
[dependencies]
nextsv = "0.12.0"