on server start print version info

This commit is contained in:
Christian Goll
2021-10-07 11:01:59 +02:00
parent 58c6adaff4
commit 0a6d8b39a6
4 changed files with 12 additions and 5 deletions

View File

@@ -3,14 +3,13 @@ package version
import (
"fmt"
"github.com/hpcng/warewulf/internal/pkg/version"
"github.com/spf13/cobra"
)
var Version = "development"
func CobraRunE(cmd *cobra.Command, args []string) error {
fmt.Println("Version:\t", Version)
fmt.Println("Version:\t", version.GetVersion())
return nil
}