Now --version-patch does not print metadata, and -proper and -meta have
been added to filter particular part ("proper" semver field w/o
meta-data, or meta-data only).
If not in git (e.g. unpacked tarball), trust the tree and just use
VERSION from config.mk.
Otherwise, take newest tag, and if HEAD is tagged, use that tag
(without the initial "v"). If HEAD is newer, form build meta-data
field from shortened commit hash; furthermore if tree is "dirty" (i.e.
has some files modified, add ".dirty" to the version number.
For example, you just tagged the HEAD with v1.0.1, the version
number is therefore
1.0.1
Now you edit a file. At this moment if you build the project, the
version will be
1.0.1+dirty
If you add + commit that change, the "dirty" has name now:
1.0.1+ga34f8c
but now if you edit a file and re-build, you get "dirty" again:
1.0.1+ga34f8c.dirty
In other words, anytime you see "dirty" in the version info, you know
that the tree was manually modified (which could mean anything from
fixing a typo to completely changing the code).
If there's only g??????, then the code has been modified as well, but at
least you may have reference to the actual tree.
At any rate, any version with any meta-data is purely internal and
should never be used for comparison (your tests should not rely on
version string comparison).
Contains charmenu, a utility function to help define and utilize
interactive "character menu" as we know it from yum, apt, git and
many, many other CLI tools.
All this module does is create a temp directory FFOO_TMP, that can be
shared among modules. This simplifies clenanup but should be only
used very rarely and only by modules (i.e. not by user code).