Changeset - 7651f0cbca82
[Not reviewed]
default
0 2 0
Thomas De Schampheleire - 7 years ago 2018-12-17 22:33:29
thomas.de_schampheleire@nokia.com
kallithea-cli: remind users to generate the front-end

Being in the habit of just generating a config file and possibly a database,
users may forget to generate the front-end and get a crippled Kallithea
experience at first set-up.

Try to avoid this by reminding users explicitly about front-end-build in
these two steps of the set-up process.
2 files changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/bin/kallithea_cli_config.py
Show inline comments
 
@@ -77,15 +77,16 @@ def config_create(config_file, key_value
 
                ini_settings[section_name][key] = value
 
        else:
 
            raise ValueError("Invalid name=value parameter %r" % parameter)
 

	
 
    # use default that cannot be replaced
 
    mako_variable_values.update({
 
        'uuid': lambda: uuid.uuid4().hex,
 
    })
 
    try:
 
        config_file_abs = os.path.abspath(config_file)
 
        inifile.create(config_file_abs, mako_variable_values, ini_settings)
 
        click.echo('Wrote new config file in %s' % config_file_abs)
 
        click.echo("Don't forget to build the front-end using 'kallithea-cli front-end-build'.")
 

	
 
    except Exception:
 
        click.echo(mako.exceptions.text_error_template().render())
kallithea/bin/kallithea_cli_db.py
Show inline comments
 
@@ -67,12 +67,13 @@ def db_create(user, password, email, rep
 

	
 
    # initial repository scan
 
    kallithea.config.middleware.make_app_without_logging(
 
            kallithea.CONFIG.global_conf, **kallithea.CONFIG.local_conf)
 
    added, _ = kallithea.lib.utils.repo2db_mapper(kallithea.model.scm.ScmModel().repo_scan())
 
    if added:
 
        click.echo('Initial repository scan: added following repositories:')
 
        click.echo('\t%s' % '\n\t'.join(added))
 
    else:
 
        click.echo('Initial repository scan: no repositories found.')
 

	
 
    click.echo('Database set up successfully.')
 
    click.echo("Don't forget to build the front-end using 'kallithea-cli front-end-build'.")
0 comments (0 inline, 0 general)