mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 04:09:40 -06:00
make version command registry aware
This commit is contained in:
@@ -4,8 +4,9 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/registry"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/micro/go-micro/v2/registry/mdns"
|
||||
tw "github.com/olekukonko/tablewriter"
|
||||
"github.com/owncloud/ocis/settings/pkg/config"
|
||||
"github.com/owncloud/ocis/settings/pkg/flagset"
|
||||
@@ -18,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command {
|
||||
Usage: "Print the versions of the running instances",
|
||||
Flags: flagset.ListSettingsWithConfig(cfg),
|
||||
Action: func(c *cli.Context) error {
|
||||
reg := mdns.NewRegistry()
|
||||
reg := *registry.GetRegistry()
|
||||
services, err := reg.GetService(cfg.GRPC.Namespace + "." + cfg.Service.Name)
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Errorf("could not get settings services from the registry: %v", err))
|
||||
|
||||
Reference in New Issue
Block a user