37 lines
845 B
Python
Executable File
37 lines
845 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import traceback
|
|
from subprocess import SubprocessError
|
|
|
|
import typer
|
|
|
|
from git_flow import GitFlowError
|
|
from git_flow.command import base, branch, commit, init, merge, new, release, tag
|
|
|
|
REPOSITORY_TOKEN_PATH = ".repository-token"
|
|
LOCALE = "es_AR.UTF-8"
|
|
|
|
|
|
app = typer.Typer()
|
|
app.add_typer(init.app)
|
|
app.add_typer(new.app)
|
|
app.add_typer(commit.app)
|
|
app.add_typer(merge.app)
|
|
app.add_typer(tag.app)
|
|
app.add_typer(release.app)
|
|
app.add_typer(branch.app)
|
|
|
|
|
|
def main():
|
|
try:
|
|
app()
|
|
print()
|
|
except GitFlowError as e:
|
|
lines = [str(e), ""]
|
|
lines += traceback.format_exception(e)
|
|
base.io_error("".join(lines), title="Git Flow")
|
|
except SubprocessError as e:
|
|
base.io_error(str(e), title="Comando")
|
|
except KeyboardInterrupt:
|
|
base.io_error("Ejecución abortada")
|