From 7d71dbb5bbb8d2bac78e3b3ebd95af3a0e1b9ed7 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Wed, 18 Nov 2020 18:31:46 +0100 Subject: [PATCH] report metal-hammer version in event (#38) --- cmd/root.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index f9136320..ab89e3ba 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,6 +1,7 @@ package cmd import ( + "fmt" "time" httptransport "github.com/go-openapi/runtime/client" @@ -19,6 +20,7 @@ import ( "github.com/metal-stack/metal-hammer/pkg/os/command" "github.com/metal-stack/metal-hammer/pkg/password" mn "github.com/metal-stack/metal-lib/pkg/net" + "github.com/metal-stack/v" "github.com/pkg/errors" ) @@ -47,7 +49,7 @@ func Run(spec *Specification, hal hal.InBand) (*event.EventEmitter, error) { certsClient := certs.New(transport, strfmt.Default) eventEmitter := event.NewEventEmitter(client, spec.MachineUUID) - eventEmitter.Emit(event.ProvisioningEventPreparing, "starting metal-hammer") + eventEmitter.Emit(event.ProvisioningEventPreparing, fmt.Sprintf("starting metal-hammer version:%q", v.V)) err := command.CommandsExist() if err != nil {