Exemplo 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)
Exemplo n.º 2
0
def _weak_bootstrapping(args):
    args.languages_to_build = args.editions_to_build = []
    args.builder = 'html'
    conf = fetch_config(args)
    app = BuildApp(conf)

    try:
        sphinx_publication(conf, args, app)
    except:
        sphinx_publication(conf, args, app)
        shutil.rmtree('docs-tools')

    command('python build/docs-tools/makecloth/meta.py build/makefile.meta')
Exemplo 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)
Exemplo n.º 4
0
def push(args):
    c = fetch_config(args)
    app = BuildApp(c)

    sphinx_ret = sphinx_publication(c, args, app)
    if sphinx_ret == 0 or c.runstate.force is True:
        deploy_worker(c, app)
    else:
        logger.warning('a sphinx build failed, and build not forced. not deploying.')
Exemplo n.º 5
0
def publish_and_deploy(args):
    c = fetch_config(args)
    app = BuildApp(c)

    sphinx_ret = sphinx_publication(c, args, app)
    if sphinx_ret == 0 or c.runstate.force is True:
        deploy_worker(c, app)
    else:
        logger.warning(sphinx_ret + ' sphinx build(s) failed, and build not forced. not deploying.')
Exemplo n.º 6
0
def _weak_bootstrapping(args):
    args.languages_to_build = args.editions_to_build = []
    args.builder = 'html'
    conf = fetch_config(args)
    app = BuildApp(conf)

    mod_path = os.path.dirname(inspect.getfile(giza))
    qstart_path = os.path.join(mod_path, 'quickstart')

    command('rsync --ignore-existing --recursive {0}/. {1}'.format(qstart_path, os.getcwd()))
    logger.info('migrated new site files')

    try:
        sphinx_publication(conf, args, app)
    except:
        sphinx_publication(conf, args, app)
        shutil.rmtree('docs-tools')

    command('python build/docs-tools/makecloth/meta.py build/makefile.meta')
    logger.info('bootstrapped makefile system')

    logger.info('updated project skeleton in current directory.')
Exemplo n.º 7
0
def _weak_bootstrapping(args):
    args.languages_to_build = args.editions_to_build = []
    args.builder = 'html'
    conf = fetch_config(args)
    app = BuildApp(conf)

    mod_path = os.path.dirname(inspect.getfile(giza))
    qstart_path = os.path.join(mod_path, 'quickstart')

    command('rsync --ignore-existing --recursive {0}/. {1}'.format(
        qstart_path, os.getcwd()))
    logger.info('migrated new site files')

    try:
        sphinx_publication(conf, args, app)
    except:
        sphinx_publication(conf, args, app)
        shutil.rmtree('docs-tools')

    command('python build/docs-tools/makecloth/meta.py build/makefile.meta')
    logger.info('bootstrapped makefile system')

    logger.info('updated project skeleton in current directory.')