From fabb5bd4a92362822407a7e89e009fbdbb4d848d Mon Sep 17 00:00:00 2001 From: Jonathan Rubenstein Date: Tue, 8 Dec 2020 11:31:54 -0500 Subject: [PATCH] [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 --g 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. --- version.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.cmake b/version.cmake index 0559ac29..548a0a5c 100644 --- a/version.cmake +++ b/version.cmake @@ -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)