SET(RSPAMD_VERSION_MAJOR 3)
SET(RSPAMD_VERSION_MINOR 7)
+SET(RSPAMD_VERSION_PATCH 0)
# Keep two digits all the time
SET(RSPAMD_VERSION_MAJOR_NUM ${RSPAMD_VERSION_MAJOR}0)
SET(RSPAMD_VERSION_MINOR_NUM ${RSPAMD_VERSION_MINOR}0)
+SET(RSPAMD_VERSION_PATCH_NUM ${RSPAMD_VERSION_PATCH}0)
IF (GIT_ID)
SET(GIT_VERSION 1)
SET(RSPAMD_ID "${GIT_ID}")
ENDIF ()
-SET(RSPAMD_VERSION "${RSPAMD_VERSION_MAJOR}.${RSPAMD_VERSION_MINOR}")
+SET(RSPAMD_VERSION "${RSPAMD_VERSION_MAJOR}.${RSPAMD_VERSION_MINOR}.${RSPAMD_VERSION_PATCH}")
PROJECT(rspamd VERSION "${RSPAMD_VERSION}" LANGUAGES C CXX ASM)
#define RSPAMD_VERSION_MAJOR "${RSPAMD_VERSION_MAJOR}"
#define RSPAMD_VERSION_MINOR "${RSPAMD_VERSION_MINOR}"
+#define RSPAMD_VERSION_PATCH "${RSPAMD_VERSION_PATCH}"
#define RSPAMD_VERSION_MAJOR_NUM ${RSPAMD_VERSION_MAJOR_NUM}
#define RSPAMD_VERSION_MINOR_NUM ${RSPAMD_VERSION_MINOR_NUM}
+#define RSPAMD_VERSION_PATCH_NUM ${RSPAMD_VERSION_PATCH_NUM}
#define RSPAMD_VERSION_BRANCH "${RSPAMD_VERSION_MAJOR}"
type = lua_tostring(L, 1);
if (g_ascii_strcasecmp(type, "short") == 0) {
version_num = RSPAMD_VERSION_MAJOR_NUM * 1000 +
- RSPAMD_VERSION_MINOR_NUM * 100;
+ RSPAMD_VERSION_MINOR_NUM * 100 +
+ RSPAMD_VERSION_PATCH_NUM * 10;
}
else if (g_ascii_strcasecmp(type, "main") == 0) {
version_num = RSPAMD_VERSION_MAJOR_NUM * 1000 +
- RSPAMD_VERSION_MINOR_NUM * 100;
+ RSPAMD_VERSION_MINOR_NUM * 100 +
+ RSPAMD_VERSION_PATCH_NUM * 10;
}
else if (g_ascii_strcasecmp(type, "major") == 0) {
version_num = RSPAMD_VERSION_MAJOR_NUM;
}
+ else if (g_ascii_strcasecmp(type, "patch") == 0) {
+ version_num = RSPAMD_VERSION_PATCH_NUM;
+ }
else if (g_ascii_strcasecmp(type, "minor") == 0) {
version_num = RSPAMD_VERSION_MINOR_NUM;
}
"." RSPAMD_VERSION_MINOR;
}
else if (g_ascii_strcasecmp(type, "main") == 0) {
- result = RSPAMD_VERSION_MAJOR "." RSPAMD_VERSION_MINOR;
+ result = RSPAMD_VERSION_MAJOR "." RSPAMD_VERSION_MINOR "." RSPAMD_VERSION_PATCH;
}
else if (g_ascii_strcasecmp(type, "major") == 0) {
result = RSPAMD_VERSION_MAJOR;
else if (g_ascii_strcasecmp(type, "minor") == 0) {
result = RSPAMD_VERSION_MINOR;
}
+ else if (g_ascii_strcasecmp(type, "patch") == 0) {
+ result = RSPAMD_VERSION_PATCH;
+ }
else if (g_ascii_strcasecmp(type, "id") == 0) {
result = RID;
}