Skip to main content

Module version

Module version 

Source
Expand description

Hybrid Git-based SemVer.

DevFlow derives the version from a mix of the project’s version file and git history rather than a config-driven scheme:

  • MAJOR — read from the auto-detected version file (Cargo.toml, pyproject.toml, or package.json). This is the one component a human bumps deliberately.
  • MINOR — the number of git tags (one tag per shipped milestone).
  • PATCH — commits since the most recent tag.

Structs§

Version
A computed semantic version.

Enums§

VersionError
Errors produced by version operations.

Functions§

commits_since_last_minor_tag
Count commits since the most recent tag (the PATCH component). If there are no tags yet, counts all commits reachable from HEAD.
compute_version
Compute the full version: MAJOR from the version file, MINOR from the tag count, PATCH from commits since the last tag.
count_git_tags
Count all git tags (the MINOR component).
detect_version_file
Detect the project’s version file, checking Cargo.toml, then pyproject.toml, then package.json. Returns the first that exists.
read_major_version
Read the MAJOR version component from a version file.
write_version
Write version into the project’s auto-detected version file.