Skip to main content

apply_prerelease_bump

Function apply_prerelease_bump 

Source
pub fn apply_prerelease_bump(
    version: &Version,
    bump: BumpLevel,
    prerelease_id: &str,
    existing_tags: &[Version],
) -> Version
Expand description

Apply a bump and produce a pre-release version.

Given a base version (the latest stable tag) and existing pre-release tags, computes the next pre-release: X.Y.Z-<id>.N.

  • If the bumped version matches existing pre-release tags with the same id, increments N (e.g. 1.1.0-alpha.11.1.0-alpha.2).
  • Otherwise starts at .1.