Mercurial > kallithea
changeset 8429:04908b44005c stable
ini: put kallithea-config version in the ini file it creates (Issue #373)
Help keeping track of how the .ini was created.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Fri, 22 May 2020 16:54:10 +0200 |
parents | 6eb1f66ac23f |
children | 642e6d7d18c4 |
files | kallithea/bin/kallithea_cli_config.py kallithea/lib/inifile.py kallithea/lib/paster_commands/template.ini.mako |
diffstat | 3 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/bin/kallithea_cli_config.py Fri May 22 16:45:09 2020 +0200 +++ b/kallithea/bin/kallithea_cli_config.py Fri May 22 16:54:10 2020 +0200 @@ -62,6 +62,7 @@ """ mako_variable_values = { + 'version': kallithea.__version__, 'git_hook_interpreter': sys.executable, 'user_home_path': os.path.expanduser('~'), 'kallithea_cli_path': cli_base.kallithea_cli_path,
--- a/kallithea/lib/inifile.py Fri May 22 16:45:09 2020 +0200 +++ b/kallithea/lib/inifile.py Fri May 22 16:54:10 2020 +0200 @@ -40,6 +40,7 @@ 'host': '127.0.0.1', 'port': '5000', 'uuid': lambda: 'VERY-SECRET', + 'version': '', } variable_options = {
--- a/kallithea/lib/paster_commands/template.ini.mako Fri May 22 16:45:09 2020 +0200 +++ b/kallithea/lib/paster_commands/template.ini.mako Fri May 22 16:54:10 2020 +0200 @@ -1,7 +1,7 @@ ## -*- coding: utf-8 -*- <%text>##</%text>################################################################################# <%text>##</%text>################################################################################# -<%text>##</%text> Kallithea config file generated with kallithea-config ## +<%text>##</%text> Kallithea config file generated with kallithea-config ${'%-24s' % version }## <%text>##</%text> ## <%text>##</%text> The %(here)s variable will be replaced with the parent directory of this file ## <%text>##</%text>#################################################################################