Function cargo_next::bump_version[][src]

pub fn bump_version(
    path: impl AsRef<Path>,
    type: SemVer
) -> Result<Version, Error>

Bumps the version inside a Cargo.toml file according to semver specs.

Arguments

  • path: The path to the Cargo.toml file.
  • type: The type of bump. Either patch, minor or major.

Returns

The new version or an error if something went wrong during IO operations.