From c1af85f1e28ed11765be4ed8610358c48af9c69c Mon Sep 17 00:00:00 2001 From: Brad Sickles Date: Thu, 21 Nov 2024 15:47:13 -0500 Subject: [PATCH] Added "Deployment completed." message after streaming deployment logs. --- CHANGELOG.md | 3 +++ cmd/deploy.go | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 014aaeb..0de562e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 0.0.131 (Nov 21, 2024) +* Added "Deployment completed." message after streaming deployment logs. + # 0.0.130 (Nov 21, 2024) * Created fallback when we cannot find app deployment workflow. diff --git a/cmd/deploy.go b/cmd/deploy.go index 5eaa61b..d7965aa 100644 --- a/cmd/deploy.go +++ b/cmd/deploy.go @@ -97,10 +97,12 @@ func streamDeployLogs(ctx context.Context, osWriters logging.OsWriters, cfg api. } fmt.Fprintln(stdout, updated.Reference) switch updated.Status { + case types.DeployStatusCompleted: + colorstring.Fprintln(stderr, "[green]Deployment completed.[reset]") case types.DeployStatusCancelled: - return fmt.Errorf("Deploy was cancelled.") + return fmt.Errorf("Deployment was cancelled.") case types.DeployStatusFailed: - return fmt.Errorf("Deploy failed to complete: %s", updated.StatusMessage) + return fmt.Errorf("Deployment failed to complete: %s", updated.StatusMessage) } return nil } @@ -131,6 +133,9 @@ func streamDeployIntentLogs(ctx context.Context, osWriters logging.OsWriters, cf colorstring.Fprintln(stderr, "[yellow]We cannot find the deployment workflow to report the deployment logs.[reset]") colorstring.Fprintln(stderr, "[bold]Waiting for successful deployment without reporting deployment logs...[reset]") iw, err = waitForCompletedIntentWorkflow(ctx, cfg, iw) + if err == nil { + colorstring.Fprintln(stderr, "[green]Deployment completed.[reset]") + } return err }