Ejemplo n.º 1
0
def main(args):
    conf = fetch_config(args)
    targets = [t.split('-') for t in args.make_target]

    build_sphinx = True
    deploy_action = []

    sphinx_targets = set()
    for t in targets:
        should_build, sp = determine_workload(deploy_action, t, conf)
        sphinx_targets.update(sp)
        if build_sphinx is True and should_build is False:
            build_sphinx = should_build

    sphinx_targets = list(sphinx_targets)

    editions = []
    languages = []
    for rt in targets:
        for t in rt:
            if t in conf.project.edition_list:
                editions.append(t)

        rtarget = '-'.join(rt)
        if rtarget in conf.system.files.data.integration:
            languages.append(rtarget)

    if not editions:
        if len(conf.project.editions) > 0:
            editions = conf.project.edition_list
        else:
            editions = [None]
    if not languages:
        languages = [None]

    cmd = build_reporter(sphinx_targets, deploy_action, build_sphinx, editions,
                         languages, args)
    logger.info('running: ' + cmd)

    args.push_targets = deploy_action
    args.languages_to_build = languages
    args.editions_to_build = editions
    args.builder = sphinx_targets
    conf.runstate = args

    app = BuildApp(conf)

    if build_sphinx:
        sphinx_publication(conf, args, app)

    if deploy_action:
        deploy_worker(conf, app)
Ejemplo n.º 2
0
def deploy(args):
    conf = fetch_config(args)

    conf.runstate.package_path = fetch_package(conf.runstate.package_path, conf)

    logger.info('extracting package: ' + conf.runstate.package_path)
    new_conf = extract_package(conf)
    logger.info('extracted package')

    app = BuildApp(new_conf)

    logger.info('beginning deploy now.')
    deploy_worker(conf, app)
Ejemplo n.º 3
0
def main(args):
    conf = fetch_config(args)
    targets = [ t.split('-') for t in args.make_target ]

    build_sphinx = True
    deploy_action = []

    sphinx_targets = set()
    for t in targets:
        should_build, sp = determine_workload(deploy_action, t, conf)
        sphinx_targets.update(sp)
        if build_sphinx is True and should_build is False:
            build_sphinx = should_build

    sphinx_targets = list(sphinx_targets)

    editions = []
    languages = []
    for rt in targets:
        for t in rt:
            if t in conf.project.edition_list:
                editions.append(t)

        rtarget = '-'.join(rt)
        if rtarget in conf.system.files.data.integration:
            languages.append(rtarget)

    if not editions:
        if len(conf.project.editions) > 0:
            editions = conf.project.edition_list
        else:
            editions = [None]
    if not languages:
        languages = [None]

    cmd = build_reporter(sphinx_targets, deploy_action, build_sphinx, editions, languages, args)
    logger.info('running: ' + cmd)

    args.push_targets = deploy_action
    args.languages_to_build = languages
    args.editions_to_build = editions
    args.builder = sphinx_targets
    conf.runstate = args

    app = BuildApp(conf)

    if build_sphinx:
        sphinx_publication(conf, args, app)

    if deploy_action:
        deploy_worker(conf, app)