diff --git a/cmd/publish_version.go b/cmd/publish_version.go index 78297d8..820b5ec 100644 --- a/cmd/publish_version.go +++ b/cmd/publish_version.go @@ -9,6 +9,8 @@ import ( "github.com/spf13/cobra" ) +var output *bool + func init() { serviceVersionDepCmd.AddCommand(publishVersionCmd) serviceVersionCmd.AddCommand(publishVersionCmd) @@ -22,6 +24,8 @@ func init() { publishServiceVersionInput.IfMatch = publishVersionCmd.Flags().String( "etag", "", "provide etag to do the conditional publish. "+ "If the specified etag does not match the service's, the publish will fail.") + output = publishVersionCmd.Flags().Bool( + "output", false, "print raw response body of API invoke.") } var publishServiceVersionInput fc.PublishServiceVersionInput @@ -43,9 +47,14 @@ fcli service version publish -s(--service-name) service_name fmt.Printf("Error: can not create fc client: %s\n", err) return } - _, err = client.PublishServiceVersion(&publishServiceVersionInput) + + resp, err := client.PublishServiceVersion(&publishServiceVersionInput) if err != nil { fmt.Printf("Error: %s\n", err) } + + if *output { + fmt.Println(resp) + } }, } diff --git a/version/version_autogen.go b/version/version_autogen.go index f127216..7611497 100644 --- a/version/version_autogen.go +++ b/version/version_autogen.go @@ -4,7 +4,7 @@ package version // Default build-time variable for library-import. // This file is overridden on build with build-time informations. const ( - Version string = "1.0.0" + Version string = "1.0.3" ) // AUTOGENERATED FILE; see hack/.go-autogen