<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgitext.git/gen-version.sh, branch master</title>
<subtitle>cgitext – CGI for Git extension</subtitle>
<id>https://sayag.it/cgitext.git/atom/gen-version.sh?h=master</id>
<link rel='self' href='https://sayag.it/cgitext.git/atom/gen-version.sh?h=master'/>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/'/>
<updated>2026-07-30T05:22:56Z</updated>
<entry>
<title>gen-version: report the version as semver with the commit distance</title>
<updated>2026-07-30T05:22:56Z</updated>
<author>
<name>Saya Andy</name>
<email>saya.andy@posteo.com</email>
</author>
<published>2026-07-30T05:22:56Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=8c1df01ecea5b684dd420bcd5b4e4e25e56c3af8'/>
<id>urn:sha1:8c1df01ecea5b684dd420bcd5b4e4e25e56c3af8</id>
<content type='text'>
`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 &lt;saya.andy@posteo.com&gt;
</content>
</entry>
<entry>
<title>gen-version.sh: check if git is available before trying to call it</title>
<updated>2014-02-05T14:09:15Z</updated>
<author>
<name>Fabien C</name>
<email>t74jgwb88tli9ch@jetable.org</email>
</author>
<published>2014-02-01T15:07:46Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=e8cacb5981039e7e74921659ea50e287395ed411'/>
<id>urn:sha1:e8cacb5981039e7e74921659ea50e287395ed411</id>
<content type='text'>
Some people may clone the cgit repository and compile within a sandbox
or on another machine where git is not necessarily installed. When it
happens, cgit is getting compiled with an empty version number.

This commit fixes this.
</content>
</entry>
<entry>
<title>gen-version.sh: don't sed the output from git describe</title>
<updated>2007-10-01T10:09:41Z</updated>
<author>
<name>Lars Hjemli</name>
<email>hjemli@gmail.com</email>
</author>
<published>2007-10-01T10:01:51Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=97aec64973d572ec98af19383f7fbb8d54bf674e'/>
<id>urn:sha1:97aec64973d572ec98af19383f7fbb8d54bf674e</id>
<content type='text'>
Replacing '-' with '.' makes the version name slightly confusing, so lets
stick with the unmodified output of git describe.

Signed-off-by: Lars Hjemli &lt;hjemli@gmail.com&gt;
</content>
</entry>
<entry>
<title>Rewrite the makefile + gen-version.sh</title>
<updated>2007-09-03T20:17:04Z</updated>
<author>
<name>Lars Hjemli</name>
<email>hjemli@gmail.com</email>
</author>
<published>2007-09-03T19:52:14Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=e8920b52629911f92dbbecdb1d7675760e7a781e'/>
<id>urn:sha1:e8920b52629911f92dbbecdb1d7675760e7a781e</id>
<content type='text'>
The old files were simply broken, hopefully the new ones will work out
somewhat better.

Signed-off-by: Lars Hjemli &lt;hjemli@gmail.com&gt;
</content>
</entry>
<entry>
<title>Add version info from git-describe</title>
<updated>2007-06-18T08:38:40Z</updated>
<author>
<name>Lars Hjemli</name>
<email>hjemli@gmail.com</email>
</author>
<published>2007-06-18T07:42:10Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=f69250358a74efa5d7d9c562b2cdd80fad1430f1'/>
<id>urn:sha1:f69250358a74efa5d7d9c562b2cdd80fad1430f1</id>
<content type='text'>
A new script, gen-version.sh, is now invoked from 'make version' to generate
the file VERSION. This file contains a version identifier generated by
git-describe and is included in the Makefile.

Signed-off-by: Lars Hjemli &lt;hjemli@gmail.com&gt;
</content>
</entry>
</feed>
