raphael
2294650daa
- cli generated using typer package, which is added to the setup.py - if optional argument to bump is not passed, the current secret is visualized - if there is an argument, it is pushed as a message to the current sender
21 lines
356 B
Python
21 lines
356 B
Python
import bump
|
|
import typer
|
|
|
|
cli = typer.Typer()
|
|
|
|
@cli.command()
|
|
def main(message = typer.Argument(None, help="The message to be bumped")):
|
|
bp = bump.Bump()
|
|
if message is None:
|
|
bp.show_secret()
|
|
else:
|
|
bp.push(message)
|
|
|
|
@cli.command()
|
|
def push():
|
|
bp = bump.Bump()
|
|
bp.version()
|
|
|
|
if __name__ == "__main__":
|
|
typer.run(main)
|