splits main function and parser
This commit is contained in:
parent
3a47ee56bf
commit
e120815378
@ -4,7 +4,7 @@ import typer
|
|||||||
cli = typer.Typer()
|
cli = typer.Typer()
|
||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
def main(message = typer.Argument(None, help="The message to be bumped")):
|
def default(message = typer.Argument(None, help="The message to be bumped")):
|
||||||
bp = bump.Bump()
|
bp = bump.Bump()
|
||||||
if message is None:
|
if message is None:
|
||||||
bp.show_secret()
|
bp.show_secret()
|
||||||
@ -16,5 +16,8 @@ def push():
|
|||||||
bp = bump.Bump()
|
bp = bump.Bump()
|
||||||
bp.version()
|
bp.version()
|
||||||
|
|
||||||
|
def main():
|
||||||
|
typer.run(default)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
typer.run(main)
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user