Commit Graph

6 Commits

Author SHA1 Message Date
Jonathan Rubenstein
fabb5bd4a9 [cmake] remove --long from version.cmake
This means if someone checks out a tagged revision, the extra commit N
and commit hash are removed from the VERSION, leaving just the tag name

Adding any commits will cause -<commitssince>-g<commithash> to return.

The dirty worktree '+' still functions as normal, simply appended to
the end of the tag name, like 'v1.0.3+'. With both extra commits and a
dirty worktree, it will look like 'v1.0.3-2-gd6e00e4f34a+', as usual.
2021-01-01 12:10:35 +11:00
Jonathan Rubenstein
57a5488ac2 [cmake] replace git diff logic with git describe --dirty
The --dirty argument of git describe performs the same function as the
now-removed git diff logic.

It will add its argument (default '-dirty') to the end of the revision.

Providing '+' as the argument replicates old behavior.
2021-01-01 12:04:55 +11:00
Jonathan Rubenstein
9f787777b5 [cmake] ensure the version is flagged as dirty in all cases
A developer could have changes in the index which would not add the "+"
symbol.
2021-01-01 12:04:40 +11:00
Geoffrey McRae
a15de57e58 [all] more versioning fixes 2020-10-09 03:09:45 +11:00
Geoffrey McRae
4d8a116849 [all] set the working directory for git versioning commands 2020-10-09 02:54:36 +11:00
Geoffrey McRae
e6c88a4af3 [all] be smarter about getting the git version 2020-10-09 02:17:20 +11:00