Versioning
kbuild uses a git-distance based versioning scheme. Instead of deriving version bumps from conventional commit messages, the patch component is computed directly from git revision counts — producing deterministic, monotonically increasing version numbers tied to the commit graph.
Version format
<major>.<minor>.<distance>
major and minor are taken from the package’s existing version string (e.g. the version field in kmono config).
distance is a git-derived value that differs between main and feature branches.
Main branch
On the main branch, distance equals the total number of git revisions:
1.2.548
This means every merge to main produces a strictly increasing version.
Feature branches
On a feature branch, distance is a two-part value: <base>-<delta>.
-
base— the number of revisions up to the merge-base with the main branch (the point where the feature branch diverged). -
delta— the number of revisions on the feature branch since that divergence point.
1.2.501-47
This ensures feature-branch versions never collide with main-branch versions and clearly indicate how far ahead of the fork point a branch has progressed.