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, orpackage.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§
- Version
Error - 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
versioninto the project’s auto-detected version file.