aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/cfg_utils.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-01 13:04:43 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-01 13:04:43 +0000
commit2f621fc77d005236a6772f7604e3b4555827c713 (patch)
treefbeeead9271a5031cfd00170defdce99e6f196e3 /src/libserver/cfg_utils.c
parent9e49d2cb1f2045d6a8caf712bc2bdeb2f57aff25 (diff)
downloadrspamd-2f621fc77d005236a6772f7604e3b4555827c713.tar.gz
rspamd-2f621fc77d005236a6772f7604e3b4555827c713.zip
[Feature] Export versions vars to UCL
Diffstat (limited to 'src/libserver/cfg_utils.c')
-rw-r--r--src/libserver/cfg_utils.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index 1a2d40142..8261da7ed 100644
--- a/src/libserver/cfg_utils.c
+++ b/src/libserver/cfg_utils.c
@@ -943,6 +943,10 @@ rspamd_include_map_handler (const guchar *data, gsize len,
#define RSPAMD_WWWDIR_MACRO "WWWDIR"
#define RSPAMD_PREFIX_MACRO "PREFIX"
#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"
void
rspamd_ucl_add_conf_variables (struct ucl_parser *parser, GHashTable *vars)
@@ -970,6 +974,14 @@ rspamd_ucl_add_conf_variables (struct ucl_parser *parser, GHashTable *vars)
ucl_parser_register_variable (parser, RSPAMD_PREFIX_MACRO,
RSPAMD_PREFIX);
ucl_parser_register_variable (parser, RSPAMD_VERSION_MACRO, RVERSION);
+ ucl_parser_register_variable (parser, RSPAMD_VERSION_MAJOR_MACRO,
+ 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);
if (vars != NULL) {
g_hash_table_iter_init (&it, vars);