diff --git a/Makefile b/Makefile index f5778b4..01de9c3 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,5 @@ VERSION ?= $(shell ./hack/get_version_from_git.sh) -INSTALLATIONSOURCE ?= "Community" -LDFLAGS = -X github.com/trento-project/workbench/version.Version="$(VERSION)" -LDFLAGS := $(LDFLAGS) -X github.com/trento-project/workbench/version.InstallationSource="$(INSTALLATIONSOURCE)" +LDFLAGS = -X main.Version="$(VERSION)" ARCHS ?= amd64 arm64 DEBUG ?= 0 diff --git a/cmd/workbench.go b/cmd/workbench.go index 36211c5..92a660d 100644 --- a/cmd/workbench.go +++ b/cmd/workbench.go @@ -11,6 +11,8 @@ import ( "github.com/trento-project/workbench/pkg/operator" ) +var Version string + type cliOptions struct { Arguments string `long:"arguments" short:"a" description:"Json arguments of an operator" required:"true"` Verbose bool `long:"verbose" short:"v" description:"Log verbosity"` @@ -32,6 +34,11 @@ func main() { logger.SetLevel(logrus.DebugLevel) } + logger.Infof( + "starting workbench CLI, version: %s", + Version, + ) + operatorName := args[0] registry := operator.StandardRegistry(operator.WithCustomLogger(logger))