diff --git a/pkg/cmd/version/exec.go b/pkg/cmd/version/exec.go index b37a429e2..d69b6f3fc 100644 --- a/pkg/cmd/version/exec.go +++ b/pkg/cmd/version/exec.go @@ -6,6 +6,7 @@ import ( "github.com/spf13/cobra" clusteradm "open-cluster-management.io/clusteradm" + version "open-cluster-management.io/clusteradm/pkg/helpers/version" ) func (o *Options) complete(cmd *cobra.Command, args []string) (err error) { @@ -27,5 +28,8 @@ func (o *Options) run() (err error) { return err } fmt.Printf("server release\tversion\t:%s\n", serverVersion.GitVersion) + + bundleVersion := version.GetDefaultBundleVersion() + fmt.Printf("default bundle\tversion\t:%s\n", bundleVersion) return nil } diff --git a/pkg/helpers/version/version.go b/pkg/helpers/version/version.go index a1a65e6c5..4dbd2a90b 100644 --- a/pkg/helpers/version/version.go +++ b/pkg/helpers/version/version.go @@ -13,6 +13,12 @@ type VersionBundle struct { Operator string } +var defaultBundleVersion = "0.7.0" + +func GetDefaultBundleVersion() string { + return defaultBundleVersion +} + func GetVersionBundle(version string) (VersionBundle, error) { // supporting either "x.y.z" or "vx.y.z" format version @@ -52,7 +58,7 @@ func GetVersionBundle(version string) (VersionBundle, error) { } // default - versionBundleList["default"] = versionBundleList["0.7.0"] + versionBundleList["default"] = versionBundleList[defaultBundleVersion] if val, ok := versionBundleList[version]; ok { return val, nil