Incrementor is both an executable binary that can be run, and a library that can be used in Rust programs.
Installing the command-line executable
Assuming you have Rust/Cargo installed , run this command in a terminal:
cargo install incrementor
It will make the incrementor command available in your PATH if you've allowed the PATH to be modified when installing Rust . cargo uninstall incrementor uninstalls.
Adding incrementor library as a dependency
Run this command in a terminal, in your project's directory:
cargo add incrementor
To add it manually, edit your project's Cargo.toml file and add to the [dependencies] section:
incrementor = "0.2.1"
The incrementor library will be automatically available globally.
Read the incrementor library documentation .
Back to the crate overview .
Readme
Incrementor
A simple version bumping tool designed to efficiently handle multiple version numbers across various packages,
libraries, targets in monorepo setup. The focus lies in the flexibility to define all the necessary files in a
configuration file and update them with a user-friendly CLI.
For example:
#incrementor.toml
current_version = "0.1.0"
[ files.VERSION ]
search = " {current_version}"
replace = " {new_version}"
[ files.'package.json' ]
search = ' "version": "{current_version}"'
replace = ' "version": "{new_version}"'
[ files.'Cargo.toml' ]
search = 'version = " {current_version}" $'
replace = ' version = "{new_version}"'
Run incrementor to increment the version from 0. 1 . 0 to 0. 2 . 0
incrementor -- minor
Git Commit & Tag
Incrementor isn't just a version incrementor. It can also automatically generate a commit and tag in Git based on the
command-line command and configurations.
Installation
cargo install -- locked incrementor
Usage
incrementor -- minor