Versioning (#116)

Add versioning check
This commit is contained in:
gadotroee
2021-07-15 16:19:29 +03:00
committed by GitHub
parent 5e7ef0fbb9
commit a0a9d74662
16 changed files with 176 additions and 48 deletions

View File

@@ -2,6 +2,7 @@ package cmd
import (
"github.com/spf13/cobra"
"github.com/up9inc/mizu/cli/mizu"
)
type MizuViewOptions struct {
@@ -14,9 +15,15 @@ var viewCmd = &cobra.Command{
Use: "view",
Short: "Open GUI in browser",
RunE: func(cmd *cobra.Command, args []string) error {
if isCompatible, err := mizu.CheckVersionCompatibility(mizuFetchOptions.MizuPort); err != nil {
return err
} else if !isCompatible {
return nil
}
runMizuView(mizuViewOptions)
return nil
},
}
func init() {