From db4502c18639bddb9ac41782b9b71867a7e7cd02 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Wed, 20 Jan 2021 16:52:38 +0800 Subject: [PATCH] []cd .. --- cmake/version.inc | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/cmake/version.inc b/cmake/version.inc index 0509a5ce1b..2f8130f5f9 100644 --- a/cmake/version.inc +++ b/cmake/version.inc @@ -4,7 +4,7 @@ PROJECT(TDengine) IF (DEFINED VERNUMBER) SET(TD_VER_NUMBER ${VERNUMBER}) ELSE () - SET(TD_VER_NUMBER "2.0.14.0") + SET(TD_VER_NUMBER "2.0.12.0") ENDIF () IF (DEFINED VERCOMPATIBLE) @@ -16,13 +16,25 @@ ENDIF () IF (DEFINED GITINFO) SET(TD_VER_GIT ${GITINFO}) ELSE () - SET(TD_VER_GIT "community") + execute_process( + COMMAND git log -1 --format=%H + WORKING_DIRECTORY ${TD_COMMUNITY_DIR} + OUTPUT_VARIABLE GIT_COMMITID + ) + string (REGEX REPLACE "[\n\t\r]" "" GIT_COMMITID ${GIT_COMMITID}) + SET(TD_VER_GIT ${GIT_COMMITID}) ENDIF () IF (DEFINED GITINFOI) SET(TD_VER_GIT_INTERNAL ${GITINFOI}) ELSE () - SET(TD_VER_GIT_INTERNAL "internal") + execute_process( + COMMAND git log -1 --format=%H + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + OUTPUT_VARIABLE GIT_COMMITID + ) + string (REGEX REPLACE "[\n\t\r]" "" GIT_COMMITID ${GIT_COMMITID}) + SET(TD_VER_GIT_INTERNAL ${GIT_COMMITID}) ENDIF () IF (DEFINED VERDATE) -- GitLab