[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.
This commit is contained in:
Jonathan Rubenstein authored and Geoffrey McRae committed 2021-01-01 12:10:35 +11:00
1 parent 5cc4f5454f
commit fabb5bd4a9
1 file changed
+1 -1
+1 -1
View File
@@ -1,5 +1,5 @@
execute_process(
COMMAND git describe --always --long --abbrev=10 --dirty=+ --tags
COMMAND git describe --always --abbrev=10 --dirty=+ --tags
WORKING_DIRECTORY "${PROJECT_TOP}"
OUTPUT_VARIABLE GIT_REV
ERROR_QUIET)