Initial implementation of stack

Former-commit-id: 1d7128c6e1
This commit is contained in:
dboreham committed 2023-01-17 16:05:50 -07:00
1 parent fc3bcdef74
commit 2b15eff104
3 files changed
+19 -3

No files matched your search

+7 -3
View File
@@ -24,8 +24,11 @@ from app import version
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
# TODO: this seems kind of weird and heavy on boilerplate -- check it is
# the best Python can do for us.
class Options(object):
def __init__(self, quiet, verbose, dry_run, local_stack, debug):
def __init__(self, stack, quiet, verbose, dry_run, local_stack, debug):
self.stack = stack
self.quiet = quiet
self.verbose = verbose
self.dry_run = dry_run
@@ -34,6 +37,7 @@ class Options(object):
@click.group(context_settings=CONTEXT_SETTINGS)
@click.option('--stack', help="specify a stack to build/deploy")
@click.option('--quiet', is_flag=True, default=False)
@click.option('--verbose', is_flag=True, default=False)
@click.option('--dry-run', is_flag=True, default=False)
@@ -41,9 +45,9 @@ class Options(object):
@click.option('--debug', is_flag=True, default=False)
# See: https://click.palletsprojects.com/en/8.1.x/complex/#building-a-git-clone
@click.pass_context
def cli(ctx, quiet, verbose, dry_run, local_stack, debug):
def cli(ctx, stack, quiet, verbose, dry_run, local_stack, debug):
"""Laconic Stack Orchestrator"""
ctx.obj = Options(quiet, verbose, dry_run, local_stack, debug)
ctx.obj = Options(stack, quiet, verbose, dry_run, local_stack, debug)
cli.add_command(setup_repositories.command, "setup-repositories")