Beispiel #1
0
def main():
    logging.basicConfig(level=getattr(logging, LOG_LEVEL.upper()))

    parser = ArgumentParser()
    subcommand = parser.add_subparsers(dest="subcommand")

    GitVersion.setup_subparser(subcommand)
    WriteFile.setup_subparser(subcommand)

    args = parser.parse_args(default_subparser="version")

    command = args.cls(args)
    sys.exit(command.run())
Beispiel #2
0
def main():
    logging.basicConfig(level=logging.WARNING)

    parser = ArgumentParser()
    subcommand = parser.add_subparsers(dest='subcommand')

    GitVersion.setup_subparser(subcommand)
    WriteFile.setup_subparser(subcommand)

    args = parser.parse_args(default_subparser='version')

    command = args.cls(args)
    sys.exit(command.run())