#cargo-subcommand #cli #cargo #next

bin+lib cargo-next

A cargo subcommand to set the next crate version

8 releases

0.2.2 Mar 22, 2021
0.2.1 Mar 13, 2021
0.1.4 Aug 15, 2020
0.0.0 Aug 5, 2020

#285 in Cargo plugins

Download history 149/week @ 2022-04-24 115/week @ 2022-05-01 118/week @ 2022-05-08 210/week @ 2022-05-15 127/week @ 2022-05-22 134/week @ 2022-05-29 192/week @ 2022-06-05 170/week @ 2022-06-12 102/week @ 2022-06-19 79/week @ 2022-06-26 82/week @ 2022-07-03 95/week @ 2022-07-10 86/week @ 2022-07-17 116/week @ 2022-07-24 76/week @ 2022-07-31 79/week @ 2022-08-07

360 downloads per month

MIT/Apache

14KB
113 lines

cargo-next

Maintenance crates.io crates.io Documentation

A cargo subcommand to set the next version of a crate.

Installation

cargo install cargo-next --locked

Usage

Binary

$ cargo next --minor
$ cargo next 0.1.5
$ ./emits-new-version.sh | cargo next
$ cargo next --get
0.2.3

Library

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);

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~5.5MB
~107K SLoC