6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2025-01-05 23:20:40 +00:00

More explicit env generation logging

This commit is contained in:
Régis Behmo 2019-03-06 17:59:55 +01:00
parent 49c1a3d05d
commit 9b35490449
6 changed files with 5 additions and 4 deletions

View File

@ -2,6 +2,7 @@
## Latest ## Latest
- [Improvement] More explicit logging during environment generation
- [Improvement] Configurable docker images (#122) - [Improvement] Configurable docker images (#122)
- [Bugfix] Fix "android pullimage" command - [Bugfix] Fix "android pullimage" command
- [Improvement] Do not upgrade images as part of quickstart - [Improvement] Do not upgrade images as part of quickstart

View File

@ -23,7 +23,6 @@ def env(root):
config["LMS_HOST_REVERSE"] = ".".join(config["LMS_HOST"].split(".")[::-1]) config["LMS_HOST_REVERSE"] = ".".join(config["LMS_HOST"].split(".")[::-1])
tutor_env.render_target(root, config, "build") tutor_env.render_target(root, config, "build")
tutor_env.render_target(root, config, "android") tutor_env.render_target(root, config, "android")
click.echo(fmt.info("Environment generated in {}".format(root)))
@click.group( @click.group(
help="Build the application" help="Build the application"

View File

@ -2,9 +2,11 @@ import codecs
import os import os
import shutil import shutil
import click
import jinja2 import jinja2
from . import exceptions from . import exceptions
from . import fmt
from . import utils from . import utils
@ -21,6 +23,7 @@ def render_target(root, config, target):
substituted = render_str(fi.read(), config) substituted = render_str(fi.read(), config)
with open(dst, "w") as of: with open(dst, "w") as of:
of.write(substituted) of.write(substituted)
click.echo(fmt.info("Environment generated in {}".format(pathjoin(root, target))))
def render_dict(config): def render_dict(config):
""" """
@ -67,6 +70,7 @@ def copy_target(root, target):
for src, dst in walk_templates(root, target): for src, dst in walk_templates(root, target):
if is_part_of_env(src): if is_part_of_env(src):
shutil.copy(src, dst) shutil.copy(src, dst)
click.echo(fmt.info("Environment generated in {}".format(pathjoin(root, target))))
def is_part_of_env(path): def is_part_of_env(path):
return not os.path.basename(path).startswith(".") return not os.path.basename(path).startswith(".")

View File

@ -23,7 +23,6 @@ argument_image = click.argument(
@opts.root @opts.root
def env(root): def env(root):
tutor_env.copy_target(root, "build") tutor_env.copy_target(root, "build")
click.echo(fmt.info("Environment generated in {}".format(root)))
@click.command( @click.command(
short_help="Download docker images", short_help="Download docker images",

View File

@ -39,7 +39,6 @@ def env(root):
config = tutor_config.load(root) config = tutor_config.load(root)
tutor_env.render_target(root, config, "apps") tutor_env.render_target(root, config, "apps")
tutor_env.render_target(root, config, "k8s") tutor_env.render_target(root, config, "k8s")
click.echo(fmt.info("Environment generated in {}".format(root)))
@click.command(help="Run all configured Open edX services") @click.command(help="Run all configured Open edX services")
@opts.root @opts.root

View File

@ -51,7 +51,6 @@ def env(root):
config = tutor_config.load(root) config = tutor_config.load(root)
tutor_env.render_target(root, config, "apps") tutor_env.render_target(root, config, "apps")
tutor_env.render_target(root, config, "local") tutor_env.render_target(root, config, "local")
click.echo(fmt.info("Environment generated in {}".format(root)))
@click.command( @click.command(
help="Update docker images", help="Update docker images",