From 68a6f43538bd5f72c8fd26390ef15766d20a30c0 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Mon, 13 Jun 2022 10:41:14 +0200 Subject: [PATCH] fix version info --- changelog/unreleased/fix-version-info | 10 ++++++++++ extensions/app-provider/pkg/command/server.go | 2 +- extensions/app-provider/pkg/command/version.go | 2 +- extensions/app-provider/pkg/server/debug/server.go | 2 +- extensions/app-registry/pkg/command/server.go | 2 +- extensions/app-registry/pkg/command/version.go | 2 +- extensions/app-registry/pkg/server/debug/server.go | 2 +- extensions/auth-basic/pkg/command/server.go | 2 +- extensions/auth-basic/pkg/command/version.go | 2 +- extensions/auth-basic/pkg/server/debug/server.go | 2 +- extensions/auth-bearer/pkg/command/server.go | 2 +- extensions/auth-bearer/pkg/command/version.go | 2 +- extensions/auth-bearer/pkg/server/debug/server.go | 2 +- extensions/auth-machine/pkg/command/server.go | 2 +- extensions/auth-machine/pkg/command/version.go | 2 +- extensions/auth-machine/pkg/server/debug/server.go | 2 +- extensions/frontend/pkg/command/server.go | 2 +- extensions/frontend/pkg/command/version.go | 2 +- extensions/frontend/pkg/server/debug/server.go | 2 +- extensions/gateway/pkg/command/server.go | 2 +- extensions/gateway/pkg/command/version.go | 2 +- extensions/gateway/pkg/server/debug/server.go | 2 +- extensions/graph-explorer/pkg/command/server.go | 2 +- extensions/graph-explorer/pkg/command/version.go | 2 +- extensions/graph-explorer/pkg/server/debug/server.go | 2 +- extensions/graph-explorer/pkg/server/http/server.go | 4 ++-- extensions/graph/pkg/command/server.go | 2 +- extensions/graph/pkg/command/version.go | 2 +- extensions/graph/pkg/server/debug/server.go | 2 +- extensions/graph/pkg/server/http/server.go | 4 ++-- extensions/groups/pkg/command/server.go | 2 +- extensions/groups/pkg/command/version.go | 2 +- extensions/groups/pkg/server/debug/server.go | 2 +- extensions/idm/pkg/server/debug/server.go | 2 +- extensions/idp/pkg/command/server.go | 2 +- extensions/idp/pkg/command/version.go | 2 +- extensions/idp/pkg/server/debug/server.go | 2 +- extensions/idp/pkg/server/http/server.go | 4 ++-- extensions/ocdav/pkg/command/server.go | 2 +- extensions/ocdav/pkg/command/version.go | 2 +- extensions/ocdav/pkg/server/debug/server.go | 2 +- extensions/ocs/pkg/command/server.go | 2 +- extensions/ocs/pkg/command/version.go | 2 +- extensions/ocs/pkg/server/debug/server.go | 2 +- extensions/ocs/pkg/server/http/server.go | 4 ++-- extensions/proxy/pkg/command/server.go | 2 +- extensions/proxy/pkg/command/version.go | 2 +- extensions/proxy/pkg/server/debug/server.go | 2 +- extensions/proxy/pkg/server/http/server.go | 2 +- extensions/search/pkg/command/server.go | 2 +- extensions/search/pkg/command/version.go | 2 +- extensions/search/pkg/server/debug/server.go | 2 +- extensions/search/pkg/server/grpc/server.go | 2 +- extensions/settings/pkg/command/server.go | 2 +- extensions/settings/pkg/command/version.go | 2 +- extensions/settings/pkg/server/debug/server.go | 2 +- extensions/settings/pkg/server/grpc/server.go | 2 +- extensions/settings/pkg/server/http/server.go | 4 ++-- extensions/sharing/pkg/command/server.go | 2 +- extensions/sharing/pkg/command/version.go | 2 +- extensions/sharing/pkg/server/debug/server.go | 2 +- extensions/storage-publiclink/pkg/command/server.go | 2 +- extensions/storage-publiclink/pkg/command/version.go | 2 +- .../storage-publiclink/pkg/server/debug/server.go | 2 +- extensions/storage-shares/pkg/command/server.go | 2 +- extensions/storage-shares/pkg/command/version.go | 2 +- extensions/storage-shares/pkg/server/debug/server.go | 2 +- extensions/storage-system/pkg/command/server.go | 4 ++-- extensions/storage-system/pkg/command/version.go | 2 +- extensions/storage-system/pkg/server/debug/server.go | 2 +- extensions/storage-users/pkg/command/server.go | 2 +- extensions/storage-users/pkg/command/version.go | 2 +- extensions/storage-users/pkg/server/debug/server.go | 2 +- extensions/store/pkg/command/server.go | 2 +- extensions/store/pkg/command/version.go | 2 +- extensions/store/pkg/server/debug/server.go | 2 +- extensions/store/pkg/server/grpc/server.go | 2 +- extensions/thumbnails/pkg/command/server.go | 2 +- extensions/thumbnails/pkg/command/version.go | 2 +- extensions/thumbnails/pkg/server/debug/server.go | 2 +- extensions/thumbnails/pkg/server/grpc/server.go | 4 ++-- extensions/thumbnails/pkg/server/http/server.go | 4 ++-- extensions/users/pkg/command/server.go | 2 +- extensions/users/pkg/command/version.go | 2 +- extensions/users/pkg/server/debug/server.go | 2 +- extensions/web/pkg/command/version.go | 2 +- extensions/web/pkg/server/debug/server.go | 2 +- extensions/web/pkg/server/http/server.go | 4 ++-- extensions/webdav/pkg/command/server.go | 2 +- extensions/webdav/pkg/command/version.go | 2 +- extensions/webdav/pkg/server/debug/server.go | 2 +- extensions/webdav/pkg/server/http/server.go | 4 ++-- ocis/pkg/command/version.go | 2 +- 93 files changed, 112 insertions(+), 102 deletions(-) create mode 100644 changelog/unreleased/fix-version-info diff --git a/changelog/unreleased/fix-version-info b/changelog/unreleased/fix-version-info new file mode 100644 index 00000000000..b242ee4412b --- /dev/null +++ b/changelog/unreleased/fix-version-info @@ -0,0 +1,10 @@ +Bugfix: Fix version info + +We've fixed the version info that is displayed when you run: + +- `ocis version` +- `ocis version` + +Since #2918, these commands returned an empty version only. + +https://github.com/owncloud/ocis/pull/3953 diff --git a/extensions/app-provider/pkg/command/server.go b/extensions/app-provider/pkg/command/server.go index 4b167f9da1f..05acb038a9d 100644 --- a/extensions/app-provider/pkg/command/server.go +++ b/extensions/app-provider/pkg/command/server.go @@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.GRPC.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.GRPC.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the grpc endpoint") diff --git a/extensions/app-provider/pkg/command/version.go b/extensions/app-provider/pkg/command/version.go index 0623059e5bf..b65c39ee672 100644 --- a/extensions/app-provider/pkg/command/version.go +++ b/extensions/app-provider/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/app-provider/pkg/server/debug/server.go b/extensions/app-provider/pkg/server/debug/server.go index ee48d6bc4ed..d54147b6c78 100644 --- a/extensions/app-provider/pkg/server/debug/server.go +++ b/extensions/app-provider/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/app-registry/pkg/command/server.go b/extensions/app-registry/pkg/command/server.go index cba8e1835f0..3dd5a8ffa80 100644 --- a/extensions/app-registry/pkg/command/server.go +++ b/extensions/app-registry/pkg/command/server.go @@ -80,7 +80,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.GRPC.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.GRPC.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the grpc endpoint") diff --git a/extensions/app-registry/pkg/command/version.go b/extensions/app-registry/pkg/command/version.go index 909f13de0ce..491f02c2805 100644 --- a/extensions/app-registry/pkg/command/version.go +++ b/extensions/app-registry/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/app-registry/pkg/server/debug/server.go b/extensions/app-registry/pkg/server/debug/server.go index 28fb8245aca..82ffa38add3 100644 --- a/extensions/app-registry/pkg/server/debug/server.go +++ b/extensions/app-registry/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/auth-basic/pkg/command/server.go b/extensions/auth-basic/pkg/command/server.go index e18c0fcf627..c1a1e15fb79 100644 --- a/extensions/auth-basic/pkg/command/server.go +++ b/extensions/auth-basic/pkg/command/server.go @@ -98,7 +98,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.GRPC.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.GRPC.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the grpc endpoint") diff --git a/extensions/auth-basic/pkg/command/version.go b/extensions/auth-basic/pkg/command/version.go index ffb931407f5..c0138a7b4ca 100644 --- a/extensions/auth-basic/pkg/command/version.go +++ b/extensions/auth-basic/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/auth-basic/pkg/server/debug/server.go b/extensions/auth-basic/pkg/server/debug/server.go index c3b401ac36c..ed1ecb480c7 100644 --- a/extensions/auth-basic/pkg/server/debug/server.go +++ b/extensions/auth-basic/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/auth-bearer/pkg/command/server.go b/extensions/auth-bearer/pkg/command/server.go index 886e98fb884..bbf13f1fc33 100644 --- a/extensions/auth-bearer/pkg/command/server.go +++ b/extensions/auth-bearer/pkg/command/server.go @@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.GRPC.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.GRPC.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the grpc endpoint") diff --git a/extensions/auth-bearer/pkg/command/version.go b/extensions/auth-bearer/pkg/command/version.go index 0dba13638e5..ff482957f6a 100644 --- a/extensions/auth-bearer/pkg/command/version.go +++ b/extensions/auth-bearer/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/auth-bearer/pkg/server/debug/server.go b/extensions/auth-bearer/pkg/server/debug/server.go index 6f2f5d4fbf5..32d5140738f 100644 --- a/extensions/auth-bearer/pkg/server/debug/server.go +++ b/extensions/auth-bearer/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/auth-machine/pkg/command/server.go b/extensions/auth-machine/pkg/command/server.go index e98ee7fbf81..5ec422e3ee3 100644 --- a/extensions/auth-machine/pkg/command/server.go +++ b/extensions/auth-machine/pkg/command/server.go @@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.GRPC.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.GRPC.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the grpc endpoint") diff --git a/extensions/auth-machine/pkg/command/version.go b/extensions/auth-machine/pkg/command/version.go index 20a3b29487d..a687bbde999 100644 --- a/extensions/auth-machine/pkg/command/version.go +++ b/extensions/auth-machine/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/auth-machine/pkg/server/debug/server.go b/extensions/auth-machine/pkg/server/debug/server.go index bc24e75e4e4..7812ed6dee6 100644 --- a/extensions/auth-machine/pkg/server/debug/server.go +++ b/extensions/auth-machine/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/frontend/pkg/command/server.go b/extensions/frontend/pkg/command/server.go index cfc8e0c7055..90d395ac474 100644 --- a/extensions/frontend/pkg/command/server.go +++ b/extensions/frontend/pkg/command/server.go @@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.HTTP.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.HTTP.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the http endpoint") diff --git a/extensions/frontend/pkg/command/version.go b/extensions/frontend/pkg/command/version.go index f75a2a72889..33e305f4be7 100644 --- a/extensions/frontend/pkg/command/version.go +++ b/extensions/frontend/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/frontend/pkg/server/debug/server.go b/extensions/frontend/pkg/server/debug/server.go index c1258629854..7da91c51033 100644 --- a/extensions/frontend/pkg/server/debug/server.go +++ b/extensions/frontend/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/gateway/pkg/command/server.go b/extensions/gateway/pkg/command/server.go index 9132db08956..375f0a8f30a 100644 --- a/extensions/gateway/pkg/command/server.go +++ b/extensions/gateway/pkg/command/server.go @@ -80,7 +80,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.GRPC.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.GRPC.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the grpc endpoint") diff --git a/extensions/gateway/pkg/command/version.go b/extensions/gateway/pkg/command/version.go index 3b58f8ba42c..7fd1d3afcba 100644 --- a/extensions/gateway/pkg/command/version.go +++ b/extensions/gateway/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/gateway/pkg/server/debug/server.go b/extensions/gateway/pkg/server/debug/server.go index 0723560a0b9..0d3a8d24990 100644 --- a/extensions/gateway/pkg/server/debug/server.go +++ b/extensions/gateway/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/graph-explorer/pkg/command/server.go b/extensions/graph-explorer/pkg/command/server.go index 9143eff2371..f70d840f6d9 100644 --- a/extensions/graph-explorer/pkg/command/server.go +++ b/extensions/graph-explorer/pkg/command/server.go @@ -50,7 +50,7 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() - mtrcs.BuildInfo.WithLabelValues(version.String).Set(1) + mtrcs.BuildInfo.WithLabelValues(version.GetString()).Set(1) { server, err := http.Server( diff --git a/extensions/graph-explorer/pkg/command/version.go b/extensions/graph-explorer/pkg/command/version.go index e180f5a42e5..61021010b7f 100644 --- a/extensions/graph-explorer/pkg/command/version.go +++ b/extensions/graph-explorer/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/graph-explorer/pkg/server/debug/server.go b/extensions/graph-explorer/pkg/server/debug/server.go index 7a8a6786a8b..00cc7bd14dd 100644 --- a/extensions/graph-explorer/pkg/server/debug/server.go +++ b/extensions/graph-explorer/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/graph-explorer/pkg/server/http/server.go b/extensions/graph-explorer/pkg/server/http/server.go index 90fc5b9342b..865bf7b101e 100644 --- a/extensions/graph-explorer/pkg/server/http/server.go +++ b/extensions/graph-explorer/pkg/server/http/server.go @@ -17,7 +17,7 @@ func Server(opts ...Option) (http.Service, error) { http.Logger(options.Logger), http.Namespace(options.Namespace), http.Name("graph-explorer"), - http.Version(version.String), + http.Version(version.GetString()), http.Address(options.Config.HTTP.Addr), http.Context(options.Context), http.Flags(options.Flags...), @@ -33,7 +33,7 @@ func Server(opts ...Option) (http.Service, error) { middleware.Secure, middleware.Version( "graph-explorer", - version.String, + version.GetString(), ), middleware.Logger( options.Logger, diff --git a/extensions/graph/pkg/command/server.go b/extensions/graph/pkg/command/server.go index 4a17be53fa1..d8d46cc6a77 100644 --- a/extensions/graph/pkg/command/server.go +++ b/extensions/graph/pkg/command/server.go @@ -49,7 +49,7 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() - mtrcs.BuildInfo.WithLabelValues(version.String).Set(1) + mtrcs.BuildInfo.WithLabelValues(version.GetString()).Set(1) { server, err := http.Server( diff --git a/extensions/graph/pkg/command/version.go b/extensions/graph/pkg/command/version.go index ebd159a46ec..b36862b14df 100644 --- a/extensions/graph/pkg/command/version.go +++ b/extensions/graph/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/graph/pkg/server/debug/server.go b/extensions/graph/pkg/server/debug/server.go index 64bc5b826b2..ba4eed23afb 100644 --- a/extensions/graph/pkg/server/debug/server.go +++ b/extensions/graph/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/graph/pkg/server/http/server.go b/extensions/graph/pkg/server/http/server.go index 7a381a879d9..d61a17f6a80 100644 --- a/extensions/graph/pkg/server/http/server.go +++ b/extensions/graph/pkg/server/http/server.go @@ -22,7 +22,7 @@ func Server(opts ...Option) (http.Service, error) { http.Logger(options.Logger), http.Namespace(options.Config.HTTP.Namespace), http.Name("graph"), - http.Version(version.String), + http.Version(version.GetString()), http.Address(options.Config.HTTP.Addr), http.Context(options.Context), http.Flags(options.Flags...), @@ -46,7 +46,7 @@ func Server(opts ...Option) (http.Service, error) { chimiddleware.RequestID, middleware.Version( "graph", - version.String, + version.GetString(), ), middleware.Logger( options.Logger, diff --git a/extensions/groups/pkg/command/server.go b/extensions/groups/pkg/command/server.go index fd664d644ef..00c1247b307 100644 --- a/extensions/groups/pkg/command/server.go +++ b/extensions/groups/pkg/command/server.go @@ -98,7 +98,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.GRPC.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.GRPC.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the grpc endpoint") diff --git a/extensions/groups/pkg/command/version.go b/extensions/groups/pkg/command/version.go index 6fcf3e7f44f..9ad6bb137a2 100644 --- a/extensions/groups/pkg/command/version.go +++ b/extensions/groups/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/groups/pkg/server/debug/server.go b/extensions/groups/pkg/server/debug/server.go index 3c953f39034..f10461c48aa 100644 --- a/extensions/groups/pkg/server/debug/server.go +++ b/extensions/groups/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/idm/pkg/server/debug/server.go b/extensions/idm/pkg/server/debug/server.go index 574bfb32c90..6db3a833e58 100644 --- a/extensions/idm/pkg/server/debug/server.go +++ b/extensions/idm/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/idp/pkg/command/server.go b/extensions/idp/pkg/command/server.go index de5ca8d39dd..be0147f8d9b 100644 --- a/extensions/idp/pkg/command/server.go +++ b/extensions/idp/pkg/command/server.go @@ -50,7 +50,7 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() - metrics.BuildInfo.WithLabelValues(version.String).Set(1) + metrics.BuildInfo.WithLabelValues(version.GetString()).Set(1) { server, err := http.Server( diff --git a/extensions/idp/pkg/command/version.go b/extensions/idp/pkg/command/version.go index 4751d1f6124..64522d25c0a 100644 --- a/extensions/idp/pkg/command/version.go +++ b/extensions/idp/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/idp/pkg/server/debug/server.go b/extensions/idp/pkg/server/debug/server.go index f7879124acb..bac512a9c4f 100644 --- a/extensions/idp/pkg/server/debug/server.go +++ b/extensions/idp/pkg/server/debug/server.go @@ -19,7 +19,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/idp/pkg/server/http/server.go b/extensions/idp/pkg/server/http/server.go index a0c89bb5b40..e974dc9d415 100644 --- a/extensions/idp/pkg/server/http/server.go +++ b/extensions/idp/pkg/server/http/server.go @@ -43,7 +43,7 @@ func Server(opts ...Option) (http.Service, error) { http.Logger(options.Logger), http.Namespace(options.Config.HTTP.Namespace), http.Name(options.Config.Service.Name), - http.Version(version.String), + http.Version(version.GetString()), http.Address(options.Config.HTTP.Addr), http.Context(options.Context), http.Flags(options.Flags...), @@ -61,7 +61,7 @@ func Server(opts ...Option) (http.Service, error) { middleware.Secure, middleware.Version( options.Config.Service.Name, - version.String, + version.GetString(), ), middleware.Logger( options.Logger, diff --git a/extensions/ocdav/pkg/command/server.go b/extensions/ocdav/pkg/command/server.go index a544c7906c8..decc187d073 100644 --- a/extensions/ocdav/pkg/command/server.go +++ b/extensions/ocdav/pkg/command/server.go @@ -44,7 +44,7 @@ func Server(cfg *config.Config) *cli.Command { gr.Add(func() error { s, err := ocdav.Service( ocdav.Name(cfg.HTTP.Namespace+"."+cfg.Service.Name), - ocdav.Version(version.String), + ocdav.Version(version.GetString()), ocdav.Context(ctx), ocdav.Logger(logger.Logger), ocdav.Address(cfg.HTTP.Addr), diff --git a/extensions/ocdav/pkg/command/version.go b/extensions/ocdav/pkg/command/version.go index e134c1c4063..ae2b44f3122 100644 --- a/extensions/ocdav/pkg/command/version.go +++ b/extensions/ocdav/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/ocdav/pkg/server/debug/server.go b/extensions/ocdav/pkg/server/debug/server.go index dcdfefeda40..2ef2c7e600f 100644 --- a/extensions/ocdav/pkg/server/debug/server.go +++ b/extensions/ocdav/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/ocs/pkg/command/server.go b/extensions/ocs/pkg/command/server.go index beadcd57670..ade9fa50d82 100644 --- a/extensions/ocs/pkg/command/server.go +++ b/extensions/ocs/pkg/command/server.go @@ -52,7 +52,7 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() - metrics.BuildInfo.WithLabelValues(version.String).Set(1) + metrics.BuildInfo.WithLabelValues(version.GetString()).Set(1) { server, err := http.Server( diff --git a/extensions/ocs/pkg/command/version.go b/extensions/ocs/pkg/command/version.go index 2440047e4f7..a49d4ce9449 100644 --- a/extensions/ocs/pkg/command/version.go +++ b/extensions/ocs/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/ocs/pkg/server/debug/server.go b/extensions/ocs/pkg/server/debug/server.go index 7ddcc82cfd2..09c2b80f740 100644 --- a/extensions/ocs/pkg/server/debug/server.go +++ b/extensions/ocs/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/ocs/pkg/server/http/server.go b/extensions/ocs/pkg/server/http/server.go index 5589b17b4d3..47f42247ac8 100644 --- a/extensions/ocs/pkg/server/http/server.go +++ b/extensions/ocs/pkg/server/http/server.go @@ -18,7 +18,7 @@ func Server(opts ...Option) (http.Service, error) { service := http.NewService( http.Logger(options.Logger), http.Name(options.Config.Service.Name), - http.Version(version.String), + http.Version(version.GetString()), http.Namespace(options.Config.HTTP.Namespace), http.Address(options.Config.HTTP.Addr), http.Context(options.Context), @@ -42,7 +42,7 @@ func Server(opts ...Option) (http.Service, error) { middleware.Secure, middleware.Version( options.Config.Service.Name, - version.String, + version.GetString(), ), middleware.Logger(options.Logger), ocsmw.LogTrace, diff --git a/extensions/proxy/pkg/command/server.go b/extensions/proxy/pkg/command/server.go index 072a8952bee..769dba9620d 100644 --- a/extensions/proxy/pkg/command/server.go +++ b/extensions/proxy/pkg/command/server.go @@ -69,7 +69,7 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() - m.BuildInfo.WithLabelValues(version.String).Set(1) + m.BuildInfo.WithLabelValues(version.GetString()).Set(1) rp := proxy.NewMultiHostReverseProxy( proxy.Logger(logger), diff --git a/extensions/proxy/pkg/command/version.go b/extensions/proxy/pkg/command/version.go index 91f29415210..e2d1a6eb0e6 100644 --- a/extensions/proxy/pkg/command/version.go +++ b/extensions/proxy/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "Print the version of this binary and the running extension instances", Category: "Version", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/proxy/pkg/server/debug/server.go b/extensions/proxy/pkg/server/debug/server.go index 04b284027a1..02d7d3f0b60 100644 --- a/extensions/proxy/pkg/server/debug/server.go +++ b/extensions/proxy/pkg/server/debug/server.go @@ -17,7 +17,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/proxy/pkg/server/http/server.go b/extensions/proxy/pkg/server/http/server.go index f1a4ac009de..8eb8f1ba050 100644 --- a/extensions/proxy/pkg/server/http/server.go +++ b/extensions/proxy/pkg/server/http/server.go @@ -44,7 +44,7 @@ func Server(opts ...Option) (svc.Service, error) { service := svc.NewService( svc.Name(options.Config.Service.Name), - svc.Version(version.String), + svc.Version(version.GetString()), svc.TLSConfig(tlsConfig), svc.Logger(options.Logger), svc.Address(options.Config.HTTP.Addr), diff --git a/extensions/search/pkg/command/server.go b/extensions/search/pkg/command/server.go index 19bfe9a926f..2c72c8e07fa 100644 --- a/extensions/search/pkg/command/server.go +++ b/extensions/search/pkg/command/server.go @@ -48,7 +48,7 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() mtrcs := metrics.New() - mtrcs.BuildInfo.WithLabelValues(version.String).Set(1) + mtrcs.BuildInfo.WithLabelValues(version.GetString()).Set(1) grpcServer := grpc.Server( grpc.Config(cfg), diff --git a/extensions/search/pkg/command/version.go b/extensions/search/pkg/command/version.go index c5d64b2d999..ac5ca55abda 100644 --- a/extensions/search/pkg/command/version.go +++ b/extensions/search/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/search/pkg/server/debug/server.go b/extensions/search/pkg/server/debug/server.go index 5adeb0e9d88..43d2caeee6c 100644 --- a/extensions/search/pkg/server/debug/server.go +++ b/extensions/search/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/search/pkg/server/grpc/server.go b/extensions/search/pkg/server/grpc/server.go index 3e4eb1ee99b..a604223d885 100644 --- a/extensions/search/pkg/server/grpc/server.go +++ b/extensions/search/pkg/server/grpc/server.go @@ -18,7 +18,7 @@ func Server(opts ...Option) grpc.Service { grpc.Namespace(options.Config.GRPC.Namespace), grpc.Logger(options.Logger), grpc.Flags(options.Flags...), - grpc.Version(version.String), + grpc.Version(version.GetString()), ) handle, err := svc.NewHandler( diff --git a/extensions/settings/pkg/command/server.go b/extensions/settings/pkg/command/server.go index 518a13e53a9..26f863b18e3 100644 --- a/extensions/settings/pkg/command/server.go +++ b/extensions/settings/pkg/command/server.go @@ -49,7 +49,7 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() mtrcs := metrics.New() - mtrcs.BuildInfo.WithLabelValues(version.String).Set(1) + mtrcs.BuildInfo.WithLabelValues(version.GetString()).Set(1) // prepare an HTTP server and add it to the group run. httpServer := http.Server( diff --git a/extensions/settings/pkg/command/version.go b/extensions/settings/pkg/command/version.go index d8c65d3f703..d496dadeac0 100644 --- a/extensions/settings/pkg/command/version.go +++ b/extensions/settings/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/settings/pkg/server/debug/server.go b/extensions/settings/pkg/server/debug/server.go index b5faab4559d..6a46abc3b8e 100644 --- a/extensions/settings/pkg/server/debug/server.go +++ b/extensions/settings/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/settings/pkg/server/grpc/server.go b/extensions/settings/pkg/server/grpc/server.go index f2d5dafc004..7d2469606dd 100644 --- a/extensions/settings/pkg/server/grpc/server.go +++ b/extensions/settings/pkg/server/grpc/server.go @@ -19,7 +19,7 @@ func Server(opts ...Option) grpc.Service { service := grpc.NewService( grpc.Logger(options.Logger), grpc.Name(options.Name), - grpc.Version(version.String), + grpc.Version(version.GetString()), grpc.Address(options.Config.GRPC.Addr), grpc.Namespace(options.Config.GRPC.Namespace), grpc.Context(options.Context), diff --git a/extensions/settings/pkg/server/http/server.go b/extensions/settings/pkg/server/http/server.go index 5c243a6a905..d8b173a8bb2 100644 --- a/extensions/settings/pkg/server/http/server.go +++ b/extensions/settings/pkg/server/http/server.go @@ -21,7 +21,7 @@ func Server(opts ...Option) http.Service { service := http.NewService( http.Logger(options.Logger), http.Name(options.Name), - http.Version(version.String), + http.Version(version.GetString()), http.Address(options.Config.HTTP.Addr), http.Namespace(options.Config.HTTP.Namespace), http.Context(options.Context), @@ -56,7 +56,7 @@ func Server(opts ...Option) http.Service { mux.Use(middleware.Version( options.Name, - version.String, + version.GetString(), )) mux.Use(middleware.Logger( diff --git a/extensions/sharing/pkg/command/server.go b/extensions/sharing/pkg/command/server.go index 9f104fec506..3b9470c1a3a 100644 --- a/extensions/sharing/pkg/command/server.go +++ b/extensions/sharing/pkg/command/server.go @@ -98,7 +98,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.GRPC.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.GRPC.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the grpc endpoint") diff --git a/extensions/sharing/pkg/command/version.go b/extensions/sharing/pkg/command/version.go index 980376062fc..6e4842fb194 100644 --- a/extensions/sharing/pkg/command/version.go +++ b/extensions/sharing/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/sharing/pkg/server/debug/server.go b/extensions/sharing/pkg/server/debug/server.go index 87a280bc03c..c9e262a4236 100644 --- a/extensions/sharing/pkg/server/debug/server.go +++ b/extensions/sharing/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/storage-publiclink/pkg/command/server.go b/extensions/storage-publiclink/pkg/command/server.go index a892fd656d6..9a49633fd22 100644 --- a/extensions/storage-publiclink/pkg/command/server.go +++ b/extensions/storage-publiclink/pkg/command/server.go @@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.GRPC.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.GRPC.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the grpc endpoint") diff --git a/extensions/storage-publiclink/pkg/command/version.go b/extensions/storage-publiclink/pkg/command/version.go index 676531f5192..cd3ab196b57 100644 --- a/extensions/storage-publiclink/pkg/command/version.go +++ b/extensions/storage-publiclink/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/storage-publiclink/pkg/server/debug/server.go b/extensions/storage-publiclink/pkg/server/debug/server.go index ee710ba0e36..14a690a0b99 100644 --- a/extensions/storage-publiclink/pkg/server/debug/server.go +++ b/extensions/storage-publiclink/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/storage-shares/pkg/command/server.go b/extensions/storage-shares/pkg/command/server.go index fb9f19897db..a782f0e3934 100644 --- a/extensions/storage-shares/pkg/command/server.go +++ b/extensions/storage-shares/pkg/command/server.go @@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.GRPC.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.GRPC.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the grpc endpoint") diff --git a/extensions/storage-shares/pkg/command/version.go b/extensions/storage-shares/pkg/command/version.go index bf98ef56e52..c7c66653f0e 100644 --- a/extensions/storage-shares/pkg/command/version.go +++ b/extensions/storage-shares/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/storage-shares/pkg/server/debug/server.go b/extensions/storage-shares/pkg/server/debug/server.go index 05af7b77775..cf6a1af7023 100644 --- a/extensions/storage-shares/pkg/server/debug/server.go +++ b/extensions/storage-shares/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/storage-system/pkg/command/server.go b/extensions/storage-system/pkg/command/server.go index 2c418e3603b..3ece430e41f 100644 --- a/extensions/storage-system/pkg/command/server.go +++ b/extensions/storage-system/pkg/command/server.go @@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.GRPC.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.GRPC.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the grpc endpoint") @@ -96,7 +96,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.HTTP.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.HTTP.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the http endpoint") diff --git a/extensions/storage-system/pkg/command/version.go b/extensions/storage-system/pkg/command/version.go index 9f36e1bee9f..77c9277164c 100644 --- a/extensions/storage-system/pkg/command/version.go +++ b/extensions/storage-system/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/storage-system/pkg/server/debug/server.go b/extensions/storage-system/pkg/server/debug/server.go index 50383c0c7ce..63d0348db3d 100644 --- a/extensions/storage-system/pkg/server/debug/server.go +++ b/extensions/storage-system/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/storage-users/pkg/command/server.go b/extensions/storage-users/pkg/command/server.go index 8fbc04d4d55..e62f58f5c19 100644 --- a/extensions/storage-users/pkg/command/server.go +++ b/extensions/storage-users/pkg/command/server.go @@ -85,7 +85,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.GRPC.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.GRPC.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the grpc endpoint") diff --git a/extensions/storage-users/pkg/command/version.go b/extensions/storage-users/pkg/command/version.go index 1c046b5c0f8..ff47a383b30 100644 --- a/extensions/storage-users/pkg/command/version.go +++ b/extensions/storage-users/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/storage-users/pkg/server/debug/server.go b/extensions/storage-users/pkg/server/debug/server.go index 9c6d2b08693..feb67c0b4a9 100644 --- a/extensions/storage-users/pkg/server/debug/server.go +++ b/extensions/storage-users/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/store/pkg/command/server.go b/extensions/store/pkg/command/server.go index 5556d7ac453..a6974086572 100644 --- a/extensions/store/pkg/command/server.go +++ b/extensions/store/pkg/command/server.go @@ -52,7 +52,7 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() - metrics.BuildInfo.WithLabelValues(version.String).Set(1) + metrics.BuildInfo.WithLabelValues(version.GetString()).Set(1) { server := grpc.Server( diff --git a/extensions/store/pkg/command/version.go b/extensions/store/pkg/command/version.go index 48c6f1318d5..5dcb649231c 100644 --- a/extensions/store/pkg/command/version.go +++ b/extensions/store/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/store/pkg/server/debug/server.go b/extensions/store/pkg/server/debug/server.go index c02b18c4aa9..e5f4e441675 100644 --- a/extensions/store/pkg/server/debug/server.go +++ b/extensions/store/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/store/pkg/server/grpc/server.go b/extensions/store/pkg/server/grpc/server.go index a7cfcf793bb..2d7e918cb92 100644 --- a/extensions/store/pkg/server/grpc/server.go +++ b/extensions/store/pkg/server/grpc/server.go @@ -14,7 +14,7 @@ func Server(opts ...Option) grpc.Service { service := grpc.NewService( grpc.Namespace(options.Config.GRPC.Namespace), grpc.Name(options.Config.Service.Name), - grpc.Version(version.String), + grpc.Version(version.GetString()), grpc.Context(options.Context), grpc.Address(options.Config.GRPC.Addr), grpc.Logger(options.Logger), diff --git a/extensions/thumbnails/pkg/command/server.go b/extensions/thumbnails/pkg/command/server.go index a2dcffe63a8..85efcc7f711 100644 --- a/extensions/thumbnails/pkg/command/server.go +++ b/extensions/thumbnails/pkg/command/server.go @@ -52,7 +52,7 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() - metrics.BuildInfo.WithLabelValues(version.String).Set(1) + metrics.BuildInfo.WithLabelValues(version.GetString()).Set(1) service := grpc.NewService( grpc.Logger(logger), diff --git a/extensions/thumbnails/pkg/command/version.go b/extensions/thumbnails/pkg/command/version.go index 0d3e771eeb0..ae4879b7fe9 100644 --- a/extensions/thumbnails/pkg/command/version.go +++ b/extensions/thumbnails/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/thumbnails/pkg/server/debug/server.go b/extensions/thumbnails/pkg/server/debug/server.go index 1d1706d4d35..13123e33d99 100644 --- a/extensions/thumbnails/pkg/server/debug/server.go +++ b/extensions/thumbnails/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/thumbnails/pkg/server/grpc/server.go b/extensions/thumbnails/pkg/server/grpc/server.go index 9ae79b981e4..1eee17df2a3 100644 --- a/extensions/thumbnails/pkg/server/grpc/server.go +++ b/extensions/thumbnails/pkg/server/grpc/server.go @@ -19,11 +19,11 @@ func NewService(opts ...Option) grpc.Service { grpc.Logger(options.Logger), grpc.Namespace(options.Namespace), grpc.Name(options.Name), - grpc.Version(version.String), + grpc.Version(version.GetString()), grpc.Address(options.Address), grpc.Context(options.Context), grpc.Flags(options.Flags...), - grpc.Version(version.String), + grpc.Version(version.GetString()), ) tconf := options.Config.Thumbnail gc, err := pool.GetGatewayServiceClient(tconf.RevaGateway) diff --git a/extensions/thumbnails/pkg/server/http/server.go b/extensions/thumbnails/pkg/server/http/server.go index 2ae2f697bd0..540dce15529 100644 --- a/extensions/thumbnails/pkg/server/http/server.go +++ b/extensions/thumbnails/pkg/server/http/server.go @@ -17,7 +17,7 @@ func Server(opts ...Option) (http.Service, error) { service := http.NewService( http.Logger(options.Logger), http.Name(options.Config.Service.Name), - http.Version(version.String), + http.Version(version.GetString()), http.Namespace(options.Config.HTTP.Namespace), http.Address(options.Config.HTTP.Addr), http.Context(options.Context), @@ -32,7 +32,7 @@ func Server(opts ...Option) (http.Service, error) { // ocismiddleware.Secure, ocismiddleware.Version( options.Config.Service.Name, - version.String, + version.GetString(), ), ocismiddleware.Logger(options.Logger), ), diff --git a/extensions/users/pkg/command/server.go b/extensions/users/pkg/command/server.go index a68ff97fd09..bd1db9054d0 100644 --- a/extensions/users/pkg/command/server.go +++ b/extensions/users/pkg/command/server.go @@ -98,7 +98,7 @@ func Server(cfg *config.Config) *cli.Command { cfg.GRPC.Namespace+"."+cfg.Service.Name, uuid.Must(uuid.NewV4()).String(), cfg.GRPC.Addr, - version.String, + version.GetString(), logger, ); err != nil { logger.Fatal().Err(err).Msg("failed to register the grpc endpoint") diff --git a/extensions/users/pkg/command/version.go b/extensions/users/pkg/command/version.go index 46415904347..5985b232341 100644 --- a/extensions/users/pkg/command/version.go +++ b/extensions/users/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/users/pkg/server/debug/server.go b/extensions/users/pkg/server/debug/server.go index f624286de2e..362e1d2ef9b 100644 --- a/extensions/users/pkg/server/debug/server.go +++ b/extensions/users/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/web/pkg/command/version.go b/extensions/web/pkg/command/version.go index a7826f0fd1f..c792be769cf 100644 --- a/extensions/web/pkg/command/version.go +++ b/extensions/web/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/web/pkg/server/debug/server.go b/extensions/web/pkg/server/debug/server.go index 32c4566bbf4..85cd8127d1d 100644 --- a/extensions/web/pkg/server/debug/server.go +++ b/extensions/web/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/web/pkg/server/http/server.go b/extensions/web/pkg/server/http/server.go index 3ffa8653e43..8f0d964aad6 100644 --- a/extensions/web/pkg/server/http/server.go +++ b/extensions/web/pkg/server/http/server.go @@ -18,7 +18,7 @@ func Server(opts ...Option) (http.Service, error) { http.Logger(options.Logger), http.Namespace(options.Namespace), http.Name("web"), - http.Version(version.String), + http.Version(version.GetString()), http.Address(options.Config.HTTP.Addr), http.Context(options.Context), http.Flags(options.Flags...), @@ -35,7 +35,7 @@ func Server(opts ...Option) (http.Service, error) { webmid.SilentRefresh, middleware.Version( "web", - version.String, + version.GetString(), ), middleware.Logger( options.Logger, diff --git a/extensions/webdav/pkg/command/server.go b/extensions/webdav/pkg/command/server.go index cffbd1d3731..f83ed0de556 100644 --- a/extensions/webdav/pkg/command/server.go +++ b/extensions/webdav/pkg/command/server.go @@ -51,7 +51,7 @@ func Server(cfg *config.Config) *cli.Command { defer cancel() - metrics.BuildInfo.WithLabelValues(version.String).Set(1) + metrics.BuildInfo.WithLabelValues(version.GetString()).Set(1) { server, err := http.Server( diff --git a/extensions/webdav/pkg/command/version.go b/extensions/webdav/pkg/command/version.go index 215d37e5d4b..542a613c931 100644 --- a/extensions/webdav/pkg/command/version.go +++ b/extensions/webdav/pkg/command/version.go @@ -19,7 +19,7 @@ func Version(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and the running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("") diff --git a/extensions/webdav/pkg/server/debug/server.go b/extensions/webdav/pkg/server/debug/server.go index f9021c3b0fc..b6905ec4596 100644 --- a/extensions/webdav/pkg/server/debug/server.go +++ b/extensions/webdav/pkg/server/debug/server.go @@ -16,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), debug.Name(options.Config.Service.Name), - debug.Version(version.String), + debug.Version(version.GetString()), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), debug.Pprof(options.Config.Debug.Pprof), diff --git a/extensions/webdav/pkg/server/http/server.go b/extensions/webdav/pkg/server/http/server.go index a39756b9428..498f9926cb4 100644 --- a/extensions/webdav/pkg/server/http/server.go +++ b/extensions/webdav/pkg/server/http/server.go @@ -18,7 +18,7 @@ func Server(opts ...Option) (http.Service, error) { http.Logger(options.Logger), http.Namespace(options.Config.HTTP.Namespace), http.Name(options.Config.Service.Name), - http.Version(version.String), + http.Version(version.GetString()), http.Address(options.Config.HTTP.Addr), http.Context(options.Context), http.Flags(options.Flags...), @@ -41,7 +41,7 @@ func Server(opts ...Option) (http.Service, error) { middleware.Secure, middleware.Version( options.Config.Service.Name, - version.String, + version.GetString(), ), middleware.Logger( options.Logger, diff --git a/ocis/pkg/command/version.go b/ocis/pkg/command/version.go index c088ebd15d7..882e6925eb3 100644 --- a/ocis/pkg/command/version.go +++ b/ocis/pkg/command/version.go @@ -20,7 +20,7 @@ func VersionCommand(cfg *config.Config) *cli.Command { Usage: "print the version of this binary and all running extension instances", Category: "info", Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.String) + fmt.Println("Version: " + version.GetString()) fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Println("")