How Git-Based Semantic Versioning works
masterThis tool automatically produces semantic versions for a repository by inspecting its Git history. It calculates the next implied version based on the most recent tag and the commit messages since that tag.
Key Concepts:
- Implied Version: The version calculated for the current commit. Unless the current commit is already tagged, the version produced will be one value ahead of the last tag.
- Increment: A value tracking the number of commits since the last version change. This is useful for creating pre-release labels (e.g.,
1.0.0-prerelease001). - Version Bumps: Commit messages determine if the next version is a
major,minor, orpatchbump. By default, it follows Conventional Commits:feat:orfeat(scope):triggers a minor bump.!suffix (e.g.,feat!:) orBREAKING CHANGE:triggers a major bump.
- Deterministic Resolution: The version is derived solely from the Git repository, ensuring it can be injected into builds without manual maintenance.