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

Remove runtime info from version #677

Merged
merged 1 commit into from
Sep 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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