From 265657196ca86f8a7c0e89903c0014edda666050 Mon Sep 17 00:00:00 2001 From: biros Date: Wed, 22 Jan 2020 22:25:56 +0100 Subject: [PATCH 1/2] Print useful message instead of manifest when updating apps/konnectors (#1504) --- cmd/apps.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cmd/apps.go b/cmd/apps.go index 4640d17532c..d13963de0b1 100644 --- a/cmd/apps.go +++ b/cmd/apps.go @@ -362,21 +362,27 @@ func updateApp(cmd *cobra.Command, args []string, appType string) error { } c := newClient(flagDomain, appType) - manifest, err := c.UpdateApp(&client.AppOptions{ + opts := &client.AppOptions{ AppType: appType, Slug: args[0], SourceURL: src, OverridenParameters: overridenParameters, - }, flagSafeUpdate) + } + manifest, err := c.GetApp(opts) if err != nil { return err } - json, err := json.MarshalIndent(manifest.Attrs, "", " ") + newManifest, err := c.UpdateApp(opts, flagSafeUpdate) if err != nil { return err } - fmt.Println(string(json)) + msg := "%s is already up-to-date at %s" + if manifest.Attrs.Version < newManifest.Attrs.Version { + msg = "%s has been updated to %s\n" + } + fmt.Printf(msg, manifest.Attrs.Slug, manifest.Attrs.Version) + return nil } From b91d348e989cc9d8fe712e54c7cd8d591937014c Mon Sep 17 00:00:00 2001 From: biros <11281228+mamyn0va@users.noreply.github.com> Date: Thu, 23 Jan 2020 10:18:16 +0100 Subject: [PATCH 2/2] Add missing '\n' in UpdateApp output --- cmd/apps.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/apps.go b/cmd/apps.go index d13963de0b1..68f4264a99e 100644 --- a/cmd/apps.go +++ b/cmd/apps.go @@ -377,7 +377,7 @@ func updateApp(cmd *cobra.Command, args []string, appType string) error { if err != nil { return err } - msg := "%s is already up-to-date at %s" + msg := "%s is already up-to-date at %s\n" if manifest.Attrs.Version < newManifest.Attrs.Version { msg = "%s has been updated to %s\n" }