[muddle] Computing The Version Number Dynamically

Jason Self j at jxself.org
Wed Feb 7 06:45:34 PST 2018

Right now, for every commit, the interpreter is identified as being
version 1.0. I was thinking of changing the version number set in
AC_INIT to instead use a script that would compute a version number
based on information that can be obtained from git. In this way the
version information would be different for a build from any commit and
can be useful later on to find out what people are running. Especially
once --version is implemented.

For release branches, there would be a tag, and it could use git
describe -tags -long to return 1.0 if they're using that commit, or
something like 1.0-3-aef320a9 if they're building something in the 1.0
branch that's newer than 1.0. (It's the name of the tag, the number of
commits since then, and then part of the hash.)

The master branch doesn't have a tag though so maybe for that use the
name of the branch and part of the hash?


More information about the muddle mailing list