mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 11:02:08 +00:00
Fixed strange error in revision.h generation [#METR-9800].
This commit is contained in:
parent
12f520e117
commit
ba3a0000ae
@ -5,11 +5,10 @@ echo -n "#define REVISION " >> ${CMAKE_CURRENT_BINARY_DIR}/src/revision.h
|
|||||||
|
|
||||||
cd ${CMAKE_CURRENT_SOURCE_DIR};
|
cd ${CMAKE_CURRENT_SOURCE_DIR};
|
||||||
|
|
||||||
git rev-parse --is-inside-work-tree &> /dev/null
|
if (git rev-parse --is-inside-work-tree >/dev/null 2>&1)
|
||||||
if [ $? -eq 0 ]
|
|
||||||
then
|
then
|
||||||
# GIT
|
# GIT
|
||||||
( git describe --tags || echo 1 ) | cut -d "-" -f 1 >> ${CMAKE_CURRENT_BINARY_DIR}/src/revision.h;
|
( git describe --tags || echo 1 ) | cut -d "-" -f 1 >> ${CMAKE_CURRENT_BINARY_DIR}/src/revision.h;
|
||||||
else
|
else
|
||||||
#SVN
|
#SVN
|
||||||
echo && (LC_ALL=C svn info ${PROJECT_SOURCE_DIR}/ 2>/dev/null || echo Revision 1) | grep Revision | cut -d " " -f 2 >> ${CMAKE_CURRENT_BINARY_DIR}/src/revision.h;
|
echo && (LC_ALL=C svn info ${PROJECT_SOURCE_DIR}/ 2>/dev/null || echo Revision 1) | grep Revision | cut -d " " -f 2 >> ${CMAKE_CURRENT_BINARY_DIR}/src/revision.h;
|
||||||
|
Loading…
Reference in New Issue
Block a user