BTHLABS-0000: Allow bumping a single service from top-level tasks.
This commit is contained in:
parent
7c97445155
commit
77526b1fae
15
tasks.py
15
tasks.py
|
@ -272,14 +272,23 @@ def start_app(ctx: Context, service, app):
|
|||
|
||||
|
||||
@task
|
||||
def bump_version(ctx: Context, next_version: str, build: str | None = None):
|
||||
def bump_version(ctx: Context,
|
||||
next_version: str,
|
||||
build: str | None = None,
|
||||
service: str | None = None,
|
||||
):
|
||||
assert build is not None, '`--build` is required here'
|
||||
|
||||
tools_bump_version_task(ctx, next_version, build=build)
|
||||
services_to_bump = [*VERSIONED_SERVICES]
|
||||
if service is not None:
|
||||
services_to_bump = [service]
|
||||
|
||||
for service_to_setup in VERSIONED_SERVICES:
|
||||
for service_to_setup in services_to_bump:
|
||||
_run_in_service(
|
||||
ctx,
|
||||
service_to_setup,
|
||||
f'inv bump-version {next_version} --build {build}',
|
||||
)
|
||||
|
||||
if service is None:
|
||||
tools_bump_version_task(ctx, next_version, build=build)
|
||||
|
|
Loading…
Reference in New Issue
Block a user