From 0b65c937e3d272d8f9015ce7e887f4aaf03328e2 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 18 May 2019 09:42:41 +0100 Subject: [Rework] Slashing: Change versioning schema - move to 2.0 --- src/libserver/cfg_utils.c | 3 --- src/lua/lua_common.c | 18 ++---------------- 2 files changed, 2 insertions(+), 19 deletions(-) (limited to 'src') 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); -- cgit v1.2.3