diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-05-18 09:42:41 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-05-18 09:42:41 +0100 |
commit | 0b65c937e3d272d8f9015ce7e887f4aaf03328e2 (patch) | |
tree | e46787722445ca1c8f554b8921affbf166fa682a | |
parent | 0141607ec2347169666395c610654b1452eb0e78 (diff) | |
download | rspamd-0b65c937e3d272d8f9015ce7e887f4aaf03328e2.tar.gz rspamd-0b65c937e3d272d8f9015ce7e887f4aaf03328e2.zip |
[Rework] Slashing: Change versioning schema - move to 2.0
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | config.h.in | 8 | ||||
-rw-r--r-- | src/libserver/cfg_utils.c | 3 | ||||
-rw-r--r-- | src/lua/lua_common.c | 18 |
4 files changed, 8 insertions, 29 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b6983289c..2fe9ff825 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,21 +10,19 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR) PROJECT(rspamd C) ENABLE_LANGUAGE(ASM) -SET(RSPAMD_VERSION_MAJOR 1) -SET(RSPAMD_VERSION_MINOR 9) -SET(RSPAMD_VERSION_PATCH 4) +SET(RSPAMD_VERSION_MAJOR 2) +SET(RSPAMD_VERSION_MINOR 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}.${RSPAMD_VERSION_PATCH}") +SET(RSPAMD_VERSION "${RSPAMD_VERSION_MAJOR}.${RSPAMD_VERSION_MINOR}") SET(RSPAMD_MASTER_SITE_URL "https://rspamd.com") IF(NOT RSPAMD_USER) diff --git a/config.h.in b/config.h.in index 2d7fbc096..c4678b15e 100644 --- a/config.h.in +++ b/config.h.in @@ -225,23 +225,21 @@ #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}.${RSPAMD_VERSION_MINOR}" +#define RSPAMD_VERSION_BRANCH "${RSPAMD_VERSION_MAJOR}" #if defined(GIT_VERSION) && GIT_VERSION == 1 # define RVERSION "${RSPAMD_VERSION}" # define RSPAMD_VERSION_FULL "${RSPAMD_VERSION}_${RSPAMD_ID}" # define RID "${RSPAMD_ID}" -# define RSPAMD_VERSION_NUM 0x${RSPAMD_VERSION_MAJOR_NUM}${RSPAMD_VERSION_MINOR_NUM}${RSPAMD_VERSION_PATCH_NUM}${RSPAMD_ID}ULL +# define RSPAMD_VERSION_NUM 0x${RSPAMD_VERSION_MAJOR_NUM}${RSPAMD_VERSION_MINOR_NUM}00${RSPAMD_ID}ULL #else # define RSPAMD_VERSION_FULL "${RSPAMD_VERSION}" # define RVERSION "${RSPAMD_VERSION}" -# define RSPAMD_VERSION_NUM 0x${RSPAMD_VERSION_MAJOR_NUM}${RSPAMD_VERSION_MINOR_NUM}${RSPAMD_VERSION_PATCH_NUM}0000000ULL +# define RSPAMD_VERSION_NUM 0x${RSPAMD_VERSION_MAJOR_NUM}${RSPAMD_VERSION_MINOR_NUM}000000000ULL # define RID "release" #endif diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index 265e575a7..4d717c860 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -1153,7 +1153,6 @@ rspamd_include_map_handler (const guchar *data, gsize len, #define RSPAMD_VERSION_MACRO "VERSION" #define RSPAMD_VERSION_MAJOR_MACRO "VERSION_MAJOR" #define RSPAMD_VERSION_MINOR_MACRO "VERSION_MINOR" -#define RSPAMD_VERSION_PATCH_MACRO "VERSION_PATCH" #define RSPAMD_BRANCH_VERSION_MACRO "BRANCH_VERSION" #define RSPAMD_HOSTNAME_MACRO "HOSTNAME" @@ -1195,8 +1194,6 @@ rspamd_ucl_add_conf_variables (struct ucl_parser *parser, GHashTable *vars) RSPAMD_VERSION_MAJOR); ucl_parser_register_variable (parser, RSPAMD_VERSION_MINOR_MACRO, RSPAMD_VERSION_MINOR); - ucl_parser_register_variable (parser, RSPAMD_VERSION_PATCH_MACRO, - RSPAMD_VERSION_PATCH); ucl_parser_register_variable (parser, RSPAMD_BRANCH_VERSION_MACRO, RSPAMD_VERSION_BRANCH); diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c index 6502acd68..542726da4 100644 --- a/src/lua/lua_common.c +++ b/src/lua/lua_common.c @@ -407,11 +407,6 @@ rspamd_lua_rspamd_version_cmp (lua_State *L) goto set; } - if (components[2]) { - ret = rspamd_lua_cmp_version_components (components[2], - RSPAMD_VERSION_PATCH); - } - /* * XXX: we don't compare git releases assuming that it is meaningless */ @@ -437,8 +432,7 @@ rspamd_lua_rspamd_version_numeric (lua_State *L) 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_PATCH_NUM * 10; + RSPAMD_VERSION_MINOR_NUM * 100; } else if (g_ascii_strcasecmp (type, "main") == 0) { version_num = RSPAMD_VERSION_MAJOR_NUM * 1000 + @@ -450,9 +444,6 @@ rspamd_lua_rspamd_version_numeric (lua_State *L) else if (g_ascii_strcasecmp (type, "minor") == 0) { version_num = RSPAMD_VERSION_MINOR_NUM; } - else if (g_ascii_strcasecmp (type, "patch") == 0) { - version_num = RSPAMD_VERSION_PATCH_NUM; - } } lua_pushinteger (L, version_num); @@ -474,8 +465,7 @@ rspamd_lua_rspamd_version (lua_State *L) if (g_ascii_strcasecmp (type, "short") == 0) { result = RSPAMD_VERSION_MAJOR - "." RSPAMD_VERSION_MINOR - "." RSPAMD_VERSION_PATCH; + "." RSPAMD_VERSION_MINOR; } else if (g_ascii_strcasecmp (type, "main") == 0) { result = RSPAMD_VERSION_MAJOR "." RSPAMD_VERSION_MINOR; @@ -486,9 +476,6 @@ rspamd_lua_rspamd_version (lua_State *L) 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; } @@ -729,7 +716,6 @@ rspamd_lua_set_env (lua_State *L, GHashTable *vars, char **lua_env, GError **err rspamd_lua_table_set (L, "version", RVERSION); rspamd_lua_table_set (L, "ver_major", RSPAMD_VERSION_MAJOR); rspamd_lua_table_set (L, "ver_minor", RSPAMD_VERSION_MINOR); - rspamd_lua_table_set (L, "ver_patch", RSPAMD_VERSION_PATCH); rspamd_lua_table_set (L, "ver_id", RID); lua_pushstring (L, "ver_num"); lua_pushinteger (L, RSPAMD_VERSION_NUM); |