More click code

This commit is contained in:
2022-08-24 12:29:51 -06:00
parent c9d42886d5
commit 2fadafbd87
2 changed files with 26 additions and 21 deletions
+11 -4
View File
@@ -21,14 +21,21 @@ from app import deploy_system
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
class Options(object):
def __init__(self, quiet, verbose, dry_run):
self.quiet = quiet
self.verbose = verbose
self.dry_run = dry_run
@click.group(context_settings=CONTEXT_SETTINGS)
@click.option('--quiet', default=False)
@click.option('--verbose', default=False)
@click.option('--dry-run', default=False)
def cli():
"""Example script."""
print("Yo!")
click.echo('Hello World!')
# See: https://click.palletsprojects.com/en/8.1.x/complex/#building-a-git-clone
@click.pass_context
def cli(ctx, quiet, verbose, dry_run):
"""Laconic Stack Orchestrator"""
ctx.obj = Options(quiet, verbose, dry_run)
cli.add_command(setup_repositories.command,"setup-repositories")
cli.add_command(build_containers.command,"build-containers")