aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-08-08 15:08:04 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-08-08 15:08:04 +0100
commitc6949b0fd245c44d4453904775b192837e084a90 (patch)
tree4c4bd6a323bf2865e3d40f481e4be0a520f837b9
parent27a17847f923a85145f29caa817356fb8e9a5a67 (diff)
downloadrspamd-c6949b0fd245c44d4453904775b192837e084a90.tar.gz
rspamd-c6949b0fd245c44d4453904775b192837e084a90.zip
Another fix for id broken logic.
-rw-r--r--CMakeLists.txt15
-rw-r--r--config.h.in2
2 files changed, 4 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8a87aff71..3ca07b0a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -969,24 +969,15 @@ FIND_PROGRAM(HG "hg")
IF(HG)
EXECUTE_PROCESS(COMMAND "${HG}" id OUTPUT_VARIABLE HG_ID ERROR_QUIET)
IF(HG_ID)
- STRING(REGEX MATCH ^[0-9a-z]+ ID "${HG_ID}")
+ STRING(REGEX MATCH ^[0-9a-z]+ RSPAMD_ID "${HG_ID}")
ELSE(HG_ID)
FIND_FILE(HG_ARCH ".hg_archival.txt" "${CMAKE_CURRENT_SOURCE_DIR}")
IF(HG_ARCH)
FILE(READ ${HG_ARCH} HG_ID)
IF(HG_ID)
STRING(REGEX MATCH "node: [0-9a-z]+" _tmp "${HG_ID}")
- STRING(SUBSTRING "${_tmp}" 6 12 ID)
+ STRING(SUBSTRING "${_tmp}" 6 12 RSPAMD_ID)
ENDIF(HG_ID)
- ELSE(HG_ARCH)
- # Maybe this is git copy
- FIND_PROGRAM(GIT "git")
- IF(GIT)
- EXECUTE_PROCESS(COMMAND "${GIT}" --git-dir=${CMAKE_SOURCE_DIR}/.git branch -v OUTPUT_VARIABLE GIT_ID ERROR_QUIET)
- IF(GIT_ID)
- STRING(REGEX REPLACE "^. [0-9a-z]+ ([0-9a-f]+) .*" \\1 ID "${GIT_ID}")
- ENDIF(GIT_ID)
- ENDIF(GIT)
ENDIF(HG_ARCH)
ENDIF(HG_ID)
ELSE(HG)
@@ -996,7 +987,7 @@ ELSE(HG)
FILE(READ ${HG_ARCH} HG_ID)
IF(HG_ID)
STRING(REGEX MATCH "node: [0-9a-z]+" _tmp "${HG_ID}")
- STRING(SUBSTRING "${_tmp}" 6 12 ID)
+ STRING(SUBSTRING "${_tmp}" 6 12 RSPAMD_ID)
ENDIF(HG_ID)
ENDIF(HG_ARCH)
ENDIF(HG)
diff --git a/config.h.in b/config.h.in
index 9dbc84c9b..b3b1b0f2e 100644
--- a/config.h.in
+++ b/config.h.in
@@ -214,7 +214,7 @@
#define CMAKE_PREFIX "${CMAKE_INSTALL_PREFIX}"
#define RVERSION "${RSPAMD_VERSION}"
-#define RID "${ID}"
+#define RID "${RSPAMD_ID}"
#define RSPAMD_MASTER_SITE_URL "${RSPAMD_MASTER_SITE_URL}"
#define MODULES_NUM ${RSPAMD_MODULES_NUM}