feat: improve deployment workflows
This commit is contained in:
+6
-3
@@ -1,7 +1,11 @@
|
||||
import { defineCommand } from "citty";
|
||||
import { Listr } from "listr2";
|
||||
import { assertManagedNamespace } from "../lib/apply";
|
||||
import { getProject, listManagedDeployments, scaleDeployment } from "../lib/shared";
|
||||
import {
|
||||
getProject,
|
||||
listManagedDeployments,
|
||||
scaleDeployment,
|
||||
} from "../lib/shared";
|
||||
|
||||
export const stop = defineCommand({
|
||||
meta: {
|
||||
@@ -11,12 +15,11 @@ export const stop = defineCommand({
|
||||
async run() {
|
||||
await assertManagedNamespace(getProject());
|
||||
const deployments = await listManagedDeployments();
|
||||
if (deployments.length === 0) return;
|
||||
|
||||
await new Listr([
|
||||
{
|
||||
title: "Scale deployments",
|
||||
skip: () =>
|
||||
deployments.length > 0 ? false : "No managed deployments found",
|
||||
task: (_ctx, task) => {
|
||||
task.output = `${deployments.length} deployments queued`;
|
||||
return task.newListr(
|
||||
|
||||
Reference in New Issue
Block a user