diff options
| author | 2026-07-30 12:22:56 +0700 | |
|---|---|---|
| committer | 2026-07-30 12:22:56 +0700 | |
| commit | 8c1df01ecea5b684dd420bcd5b4e4e25e56c3af8 (patch) | |
| tree | 9875fd020d90e8ce178e89c0d2f32b27cfc8c836 /ui-shared.c | |
| parent | d05975170e81442bde726730b6e2d1c37ea6c560 (diff) | |
| download | cgitext-8c1df01ecea5b684dd420bcd5b4e4e25e56c3af8.tar.gz cgitext-8c1df01ecea5b684dd420bcd5b4e4e25e56c3af8.zip | |
gen-version: report the version as semver with the commit distance
`git describe` produces "v1.3.1-2-gfbb7", which is neither a Semantic
Version nor especially readable. Derive the version from the most recent
release tag and the number of commits made since it instead, giving
"v1.3.1+7", and plain "v1.3.1" when building the tag itself.
That is a valid Semantic Version 2.0.0 with the commit distance as build
metadata. Note that build metadata is excluded from precedence, so
"v1.3.1+7" and "v1.3.1" compare equal; the distance identifies a build
rather than ordering it.
Tarball builds keep falling back to the version in the Makefile, and
release tags are expected to be named vMAJOR.MINOR.PATCH for the result
to stay well-formed.
Signed-off-by: Saya Andy <saya.andy@posteo.com>
Diffstat (limited to 'ui-shared.c')
0 files changed, 0 insertions, 0 deletions