diff --git a/Makefile b/Makefile index 2c78a90b2b..1294243f0b 100644 --- a/Makefile +++ b/Makefile @@ -317,10 +317,7 @@ configgen: requirements .configgen @echo @echo "================== config gen ====================" @echo - echo "# Sample config which contains all the available options which the corresponding descriptions" > conf/st2.conf.sample; - echo "# Note: This file is automatically generated using tools/config_gen.py - DO NOT UPDATE MANUALLY" >> conf/st2.conf.sample - echo "" >> conf/st2.conf.sample - . $(VIRTUALENV_DIR)/bin/activate; python ./tools/config_gen.py >> conf/st2.conf.sample; + . $(VIRTUALENV_DIR)/bin/activate; python ./tools/config_gen.py > conf/st2.conf.sample; .PHONY: schemasgen schemasgen: requirements .schemasgen diff --git a/tools/config_gen.py b/tools/config_gen.py index aeb792e045..bb5a0f2999 100755 --- a/tools/config_gen.py +++ b/tools/config_gen.py @@ -77,6 +77,11 @@ "webui": {"webui_base_url": "https://localhost"}, } +INIT_COMMENT = """ +# Sample config which contains all the available options which the corresponding descriptions +# Note: This file is automatically generated using tools/config_gen.py - DO NOT UPDATE MANUALLY +""".strip() + COMMON_AUTH_OPTIONS_COMMENT = """ # Common option - options below apply in both scenarios - when auth service is running as a WSGI # service (e.g. under Apache or Nginx) and when it's running in the standalone mode. @@ -186,6 +191,8 @@ def _print_options(opt_group, options): def main(args): + print(INIT_COMMENT) + print("") opt_groups = {} for config in CONFIGS: mod = _import_config(config)