[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 2020-12-08 11:31:54 -05:00 committed by Geoffrey McRae
parent 5cc4f5454f
commit fabb5bd4a9

View File

@ -1,5 +1,5 @@
execute_process( execute_process(
COMMAND git describe --always --long --abbrev=10 --dirty=+ --tags COMMAND git describe --always --abbrev=10 --dirty=+ --tags
WORKING_DIRECTORY "${PROJECT_TOP}" WORKING_DIRECTORY "${PROJECT_TOP}"
OUTPUT_VARIABLE GIT_REV OUTPUT_VARIABLE GIT_REV
ERROR_QUIET) ERROR_QUIET)