Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #677 from darkowlzz/version-runtime
Browse files Browse the repository at this point in the history
Remove runtime info from version
  • Loading branch information
stealthybox committed Sep 9, 2020
2 parents 8070e7c + 61fdefb commit 9560a71
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/version/cmd/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ import (
"io"

"github.com/spf13/cobra"
igniteruntime "github.com/weaveworks/ignite/pkg/runtime"
"github.com/weaveworks/ignite/pkg/util"
"github.com/weaveworks/ignite/pkg/version"
"sigs.k8s.io/yaml"
)

// versionData provides the version information of ignite.
type versionData struct {
Ignite version.Info `json:"igniteVersion"`
Firecracker version.Info `json:"firecrackerVersion"`
Runtime igniteruntime.Name `json:"runtime"`
Ignite version.Info `json:"igniteVersion"`
Firecracker version.Info `json:"firecrackerVersion"`
}

// NewCmdVersion provides the version information of ignite
Expand All @@ -41,14 +39,12 @@ func RunVersion(out io.Writer, output string) error {
v := versionData{
Ignite: version.GetIgnite(),
Firecracker: version.GetFirecracker(),
Runtime: version.GetCurrentRuntime(),
}

switch output {
case "":
fmt.Fprintf(out, "Ignite version: %#v\n", v.Ignite)
fmt.Fprintf(out, "Firecracker version: %s\n", v.Firecracker.String())
fmt.Fprintf(out, "Runtime: %v\n", v.Runtime)
case "short":
fmt.Fprintf(out, "%s\n", v.Ignite.GitVersion)
case "yaml":
Expand Down

0 comments on commit 9560a71

Please sign in to comment.