diff --git a/tools/py/deploy.py b/tools/py/deploy.py index 598887551..94697d9c3 100644 --- a/tools/py/deploy.py +++ b/tools/py/deploy.py @@ -47,7 +47,9 @@ def _get_arg_parser(): ) # TODO: add more services (api-server, pubsub, dsqa web server, etc.) all_services = ["sparkd"] - parser.add_argument("services", help="this selects services defined in compose.yaml", nargs="*") + parser.add_argument("services", + help="this selects services defined in compose.yaml", + nargs="*") parser.set_defaults( configuration="release", services=all_services, @@ -86,8 +88,9 @@ def deploy(args): services: list[str] = args.services or [] if args.build: - build_all = len(services) == 0 - if build_all or "sparkd" in services: + should_build = len(services) == 0 or any( + filter(lambda s: s.startswith("sparkd"), services)) + if should_build: publish_sparkd.publish( publish_sparkd.PublishArgs( configuration="release",