示例#1
0
文件: make.py 项目: peppy0510/sty
def run():

    cfg = Cfg()
    args = docopt(__doc__)
    results = []

    if args['build'] and args['wheel']:
        results.append(build_wheel(cfg))

    if args['build'] and args['docs']:
        results.append(build_docs(cfg))

    if args['push']:
        results.append(push(cfg))

    if args['test']:
        test(cfg)

    if args['git']:
        results.append(git.seq.bump_git(cfg.version, new_release=False))

    if args['bump']:
        results.extend(bump(cfg))

    if results:
        print_summary(results)
示例#2
0
文件: make.py 项目: feluxe/buildlib
def run():

    cfg = Cfg()
    args = docopt(__doc__)
    results = []

    if args["<command>"] == "build":
        results.append(build(cfg))

    elif args["<command>"] == "push":
        results.append(push(cfg))

    elif args["<command>"] == "test":
        test(cfg)

    elif args["<command>"] == "git":
        results.extend(git.seq.bump_git(cfg.version, new_release=False))

    elif args["<command>"] == "bump":
        results.extend(bump(cfg))

    else:
        print(__doc__)
        return

    print_summary(results)
示例#3
0
def run():

    cfg = Cfg()
    args = docopt(__doc__)
    results = []

    if args['<command>'] == 'build':
        results.append(build(cfg))

    elif args['<command>'] == 'push':
        results.append(push(cfg))

    elif args['<command>'] == 'test':
        test(cfg)

    elif args['<command>'] == 'git':
        results.append(git.seq.bump_git(cfg.version, new_release=False))

    elif args['<command>'] == 'bump':
        results.extend(bump(cfg))

    else:
        print(__doc__)
        return

    print_summary(results)
示例#4
0
def run():

    cfg = Cfg()
    uinput = docopt(interface)
    results = []

    if uinput['build'] and uinput['wheel']:
        results.append(build_wheel(cfg))

    if uinput['build'] and uinput['docs']:
        results.append(build_docs(cfg))

    if uinput['deploy']:
        results.append(deploy(cfg))

    if uinput['test']:
        test(cfg)

    if uinput['git']:
        results.append(git.seq.bump_git(cfg.version, new_release=False))

    if uinput['bump']:
        results.extend(bump(cfg))

    if results:
        print_summary(results)
示例#5
0
def test_print_summary(capfd):

    result = CmdResult(
        val='foo',
        code=1,
        name='foo',
        status='Error',
        color=1,
        stdout=None,
        stderr=None
    )

    print_summary(result, color=False)
    print_summary([result, result, None], color=False)

    stdout, stderr = capfd.readouterr()

    assert "Summary\n-------\nfoo: Error" in stdout
    assert "Summary\n-------\nfoo: Error\nfoo: Error" in stdout
示例#6
0
文件: make.py 项目: feluxe/timecount
def run():

    cfg = Cfg()
    args = docopt(__doc__)
    results = []

    if args["build"]:
        results.append(build_wheel(cfg))

    if args["push"]:
        results.append(push(cfg))

    if args["test"]:
        test(cfg)

    if args["bump"]:
        results.extend(bump(cfg))

    if results:
        print_summary(results)
示例#7
0
def run():

    cfg = Cfg()
    args = docopt(__doc__)
    results = []

    # We must uninstall sty in order to make this script and sphix import sty from the
    # subdirectory ./sty and not from site-packages.
    sp.run(["pipenv", "uninstall", "sty", "--skip-lock"])

    if args['update'] and args['src']:
        results.append(update_src(args['<rev>']))

    if args['build']:
        results.append(build(cfg))

    if args['deploy']:
        results.append(deploy(cfg))

    if any(results):
        print_summary(results)
示例#8
0
def run():

    cfg = Cfg()
    args = docopt(__doc__)
    results = []

    if args["build"]:
        results.append(build_wheel(cfg))

    if args["push"]:
        results.append(push(cfg))

    if args["test"]:
        test(cfg)

    if args["git"]:
        results.append(git.seq.bump_git(cfg.version, new_release=False))

    if args["bump"]:
        results.extend(bump(cfg))

    if results:
        print_summary(results)