raphael
750f79f03a
- 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 - adds setup.py command line script which adds a call to the bump.cli:main function passing the cli parameters along - updates package version to 0.1.3 - Squashed commits: - commite120815378
- commit3a47ee56bf
- commitaeca052cbc
- commit2294650daa
24 lines
386 B
Python
24 lines
386 B
Python
import bump
|
|
import typer
|
|
|
|
cli = typer.Typer()
|
|
|
|
@cli.command()
|
|
def default(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()
|
|
|
|
def main():
|
|
typer.run(default)
|
|
|
|
if __name__ == "__main__":
|
|
main()
|