diff --git a/src/viur_cli/cloud.py b/src/viur_cli/cloud.py index 6f19c71..504bda9 100644 --- a/src/viur_cli/cloud.py +++ b/src/viur_cli/cloud.py @@ -84,6 +84,17 @@ def enable_gcp_backup(): print('Success! It may take a while until you can use Gcloud Backups') +@cloud.command(context_settings={"ignore_unknown_options": True}) +@click.argument("service", type=click.Choice(["gcloud"]), default="gcloud") +@click.argument("option", type=click.Choice(["datastore"]), default="datastore") +@click.argument("profile", default="default") +def cleanup(service, option, profile): + conf = config.get_profile(profile) + + if service == "gcloud" and option == "datastore": + run_command(f"gcloud datastore indexes cleanup deploy/index.yaml --project={conf['application_name']}") + + @cloud.command(context_settings={"ignore_unknown_options": True}) @click.argument("action", type=click.Choice(["backup"])) def disable(action): diff --git a/src/viur_cli/update.py b/src/viur_cli/update.py index 3b9249f..7de2a60 100644 --- a/src/viur_cli/update.py +++ b/src/viur_cli/update.py @@ -29,7 +29,7 @@ def update(action, profile, additional_args): conf = config.get_profile(profile) if action == "requirements": - create_req(profile) + create_req(True, profile)