Skip to content

Bump

How much a set of changes raises a semantic version.

Ordered from the smallest to the largest, so max of several levels is the one to apply.

use helpers4::commit::Bump;

Cargo feature commit (enabled by default). To compile only this module:

cargo add helpers4 --no-default-features --features commit

or in Cargo.toml:

[dependencies]
helpers4 = { version = "0.0.6", default-features = false, features = ["commit"] }
pub enum Bump {
    /// Nothing that affects the version (docs, tests, chores...).
    None,
    /// A backwards-compatible fix.
    Patch,
    /// A backwards-compatible feature.
    Minor,
    /// A breaking change.
    Major,
}
use helpers4::commit::Bump;

assert!(Bump::Major > Bump::Minor && Bump::Minor > Bump::Patch && Bump::Patch > Bump::None);

src/commit/bump_level.rs