Exemplo n.º 1
0
def slides_tarball(builder, conf):
    copy_if_needed(os.path.join(conf.paths.projectroot,
                                conf.paths.includes, 'hash.rst'),
                   os.path.join(conf.paths.projectroot,
                                conf.paths.branch_output,
                                builder, 'release.txt'))

    basename = os.path.join(conf.paths.projectroot,
                            conf.paths.public_site_output,
                            hyph_concat(conf.project.name,
                                        conf.git.branches.current,
                                        builder))

    tarball_fn = basename + '.tar.gz'

    tarball(name=tarball_fn,
            path=builder,
            cdir=os.path.join(conf.paths.projectroot,
                              conf.paths.branch_output),
            newp=os.path.basename(basename))

    link_name = os.path.join(conf.paths.projectroot,
                             conf.paths.public_site_output,
                             hyph_concat(conf.project.name, 'slides') + '.tar.gz')

    if os.path.exists(link_name):
        os.remove(link_name)

    create_link(input_fn=os.path.basename(tarball_fn),
                 output_fn=link_name)
Exemplo n.º 2
0
def finalize_epub_build(builder, conf):
    epub_name = "-".join(conf.project.title.lower().split())
    epub_branched_filename = epub_name + "-" + conf.git.branches.current + ".epub"
    epub_src_filename = epub_name + ".epub"

    copy_if_needed(
        source_file=os.path.join(conf.paths.projectroot, conf.paths.branch_output, builder, epub_src_filename),
        target_file=os.path.join(conf.paths.projectroot, conf.paths.public_site_output, epub_branched_filename),
    )
    create_link(
        input_fn=epub_branched_filename,
        output_fn=os.path.join(conf.paths.projectroot, conf.paths.public_site_output, epub_src_filename),
    )
Exemplo n.º 3
0
def man_tarball(builder, artifact_loc, conf):
    tarball_name = get_tarball_name('man', conf)

    tarball(name=tarball_name,
            path=artifact_loc,
            cdir=os.path.join(conf.paths.projectroot, conf.paths.branch_output),
            newp=conf.project.name + '-manpages')

    link_name = get_tarball_name('link-man', conf)

    if os.path.exists(link_name):
        os.remove(link_name)

    create_link(input_fn=os.path.basename(tarball_name),
                output_fn=link_name)
Exemplo n.º 4
0
def man_tarball(builder, artifact_loc, conf):
    tarball_name = get_tarball_name('man', conf)

    tarball(name=tarball_name,
            path=artifact_loc,
            cdir=os.path.join(conf.paths.projectroot,
                              conf.paths.branch_output),
            newp=conf.project.name + '-manpages')

    link_name = get_tarball_name('link-man', conf)

    if os.path.exists(link_name):
        os.remove(link_name)

    create_link(input_fn=os.path.basename(tarball_name), output_fn=link_name)
Exemplo n.º 5
0
def slides_tarball(builder, artifact_loc, conf):
    tarball_name = get_tarball_name('slides', conf)

    tarball(name=tarball_name,
            path=artifact_loc,
            cdir=os.path.join(conf.paths.projectroot,
                              conf.paths.branch_output),
            newp=os.path.splitext(os.path.basename(tarball_name))[0])

    link_name = get_tarball_name('link-slides', conf)

    if os.path.exists(link_name):
        os.remove(link_name)

    create_link(input_fn=os.path.basename(tarball_name), output_fn=link_name)
Exemplo n.º 6
0
def finalize_epub_build(builder, conf):
    epub_name = '-'.join(conf.project.title.lower().split())
    epub_branched_filename = epub_name + '-' + conf.git.branches.current + '.epub'
    epub_src_filename = epub_name + '.epub'

    copy_if_needed(source_file=os.path.join(conf.paths.projectroot,
                                            conf.paths.branch_output, builder,
                                            epub_src_filename),
                   target_file=os.path.join(conf.paths.projectroot,
                                            conf.paths.public_site_output,
                                            epub_branched_filename))
    create_link(input_fn=epub_branched_filename,
                output_fn=os.path.join(conf.paths.projectroot,
                                       conf.paths.public_site_output,
                                       epub_src_filename))
Exemplo n.º 7
0
def slides_tarball(builder, artifact_loc, conf):
    tarball_name = get_tarball_name('slides', conf)

    tarball(name=tarball_name,
            path=artifact_loc,
            cdir=os.path.join(conf.paths.projectroot,
                              conf.paths.branch_output),
            newp=os.path.splitext(os.path.basename(tarball_name))[0])

    link_name = get_tarball_name('link-slides', conf)

    if os.path.exists(link_name):
        os.remove(link_name)

    create_link(input_fn=os.path.basename(tarball_name),
                output_fn=link_name)
Exemplo n.º 8
0
def create_manual_symlink(conf):
    fpath = os.path.join(conf.paths.projectroot,
                         conf.paths.builddata, 'integration.yaml')

    if os.path.exists(fpath):
        iconf = ingest_yaml_doc(fpath)
    else:
        return False

    if 'base' not in iconf:
        return True
    else:
        if 'links' not in iconf['base']:
            return True
        else:
            links = get_top_level_links(iconf['base']['links'], conf)

            if links:
                for name, target in links:
                    create_link(target, name)
Exemplo n.º 9
0
def slides_tarball(builder, conf):
    copy_if_needed(
        os.path.join(conf.paths.projectroot, conf.paths.includes, 'hash.rst'),
        os.path.join(conf.paths.projectroot, conf.paths.branch_output, builder,
                     'release.txt'))

    tarball_name = get_tarball_name('slides', conf)

    tarball(name=tarball_name,
            path=builder,
            cdir=os.path.join(conf.paths.projectroot,
                              conf.paths.branch_output),
            newp=os.path.splitext(os.path.basename(tarball_name))[0])

    link_name = get_tarball_name('link-slides', conf)

    if os.path.exists(link_name):
        os.remove(link_name)

    create_link(input_fn=os.path.basename(tarball_name), output_fn=link_name)
Exemplo n.º 10
0
def man_tarball(builder, conf):
    basename = os.path.join(conf.paths.projectroot,
                            conf.paths.public_site_output,
                            'manpages-' + conf.git.branches.current)

    tarball_name = basename + '.tar.gz'
    tarball(name=tarball_name,
            path=builder,
            cdir=os.path.join(conf.paths.projectroot, conf.paths.branch_output),
            newp=conf.project.name + '-manpages')


    link_name = os.path.join(conf.paths.projectroot,
                             conf.paths.public_site_output,
                             'manpages' + '.tar.gz')

    if os.path.exists(link_name):
        os.remove(link_name)

    create_link(input_fn=os.path.basename(tarball_name),
                 output_fn=link_name)
Exemplo n.º 11
0
def slides_tarball(builder, conf):
    copy_if_needed(os.path.join(conf.paths.projectroot,
                                conf.paths.includes, 'hash.rst'),
                   os.path.join(conf.paths.projectroot,
                                conf.paths.branch_output,
                                builder, 'release.txt'))

    tarball_name = get_tarball_name('slides', conf)

    tarball(name=tarball_name,
            path=builder,
            cdir=os.path.join(conf.paths.projectroot,
                              conf.paths.branch_output),
            newp=os.path.splitext(os.path.basename(tarball_name))[0])

    link_name = get_tarball_name('link-slides', conf)

    if os.path.exists(link_name):
        os.remove(link_name)

    create_link(input_fn=os.path.basename(tarball_name),
                 output_fn=link_name)
Exemplo n.º 12
0
def create_manual_symlink(conf):
    public_links = get_public_links(conf)

    for name, target in public_links:
        create_link(target, name)
Exemplo n.º 13
0
def create_manual_symlink(conf):
    public_links = get_public_links(conf)

    for name, target in public_links:
        logger.info('creating link to "{0}", named "{1}"'.format(target, name))
        create_link(target, name)
Exemplo n.º 14
0
def create_manual_symlink(conf):
    public_links = get_public_links(conf)

    for name, target in public_links:
        create_link(target, name)
Exemplo n.º 15
0
def create_manual_symlink(conf):
    public_links = get_public_links(conf)

    for name, target in public_links:
        logger.info('creating link to "{0}", named "{1}"'.format(target, name))
        create_link(target, name)