mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-24 04:58:31 -05:00
add version command and add build information to metrics
Signed-off-by: David Christofas <dchristofas@owncloud.com>
This commit is contained in:
@@ -4,6 +4,7 @@ package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/ocis/pkg/version"
|
||||
"github.com/owncloud/ocis/webdav/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis/webdav/pkg/config"
|
||||
"github.com/owncloud/ocis/webdav/pkg/flagset"
|
||||
@@ -18,6 +19,9 @@ func WebDAVCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: "Start webdav server",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.ServerWithConfig(cfg.WebDAV),
|
||||
Subcommands: []*cli.Command {
|
||||
command.PrintVersion(cfg.WebDAV),
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
webdavCommand := command.Server(configureWebDAV(cfg))
|
||||
|
||||
@@ -34,6 +38,7 @@ func configureWebDAV(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.WebDAV.Log.Level = cfg.Log.Level
|
||||
cfg.WebDAV.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.WebDAV.Log.Color = cfg.Log.Color
|
||||
cfg.WebDAV.Service.Version = version.String
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.WebDAV.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
|
||||
Reference in New Issue
Block a user