GitHub - conventional-commits-rs/cargo-next: A cargo subcommand to query or set the version of a crate. (original) (raw)
use cargo_next::{bump_version, get_version, set_version, SemVer};
let path_to_toml = ...;
// Bump the version by a semver component. let _res = bump_version(&path_to_toml, SemVer::Minor); // Set the version directly. let _res = set_version(&path_to_toml, "0.1.2"); // Or get the version of a crate. let _res = get_version(&path_to_toml);