Beispiel #1
0
def main():
    parser = argparse.ArgumentParser(description='srt - stable -rt tool')
    parser.add_argument('-d',
                        '--debug',
                        action='store_true',
                        help='Enable debug logging')

    subparser = parser.add_subparsers(help='sub command help', dest='cmd')

    sub_cmd = [
        srt_commit,
        srt_tag,
        srt_create,
        srt_sign,
        srt_upload,
        srt_push,
        srt_announce,
    ]

    for cmd in sub_cmd:
        cmd.add_argparser(subparser)

    args = parser.parse_args(sys.argv[1:])
    if args.debug:
        logging.getLogger().setLevel(logging.DEBUG)
    else:
        logging.getLogger().setLevel(logging.INFO)

    config = get_config()
    ctx = get_context(args)
    if not ctx:
        sys.exit(1)

    for cmd in sub_cmd:
        cmd.execute(args, config, ctx)
Beispiel #2
0
def execute(args):
    ctx = SrtContext(args)
    check_context(ctx)

    push(get_config(), ctx)
Beispiel #3
0
def execute(args):
    ctx = SrtContext(args)
    check_context(ctx)

    upload(get_config(), ctx)
Beispiel #4
0
def execute(args):
    commit(get_config(), args.release_candidate)
Beispiel #5
0
def execute(args):
    tag(get_config())
Beispiel #6
0
def execute(args):
    ctx = SrtContext(args)
    check_context(ctx)

    announce(get_config(), ctx, args)