From 5ac956b0f10d1af1de6fad7bb119c6001bda1eeb Mon Sep 17 00:00:00 2001 From: Livio Spring Date: Mon, 7 Nov 2022 10:50:44 +0100 Subject: [PATCH] fix: allow version to be overwritten by build again (#4656) --- cmd/build/info.go | 6 +++++- internal/eventstore/handler/crdb/init.go | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/build/info.go b/cmd/build/info.go index 1bf5b18ded..9fcf446317 100644 --- a/cmd/build/info.go +++ b/cmd/build/info.go @@ -3,13 +3,17 @@ package build import "time" var ( - version = time.Now().Format(time.RFC3339) + version = "" commit = "" date = "" dateTime time.Time ) func Version() string { + if version != "" { + return version + } + version = Date().Format(time.RFC3339) return version } diff --git a/internal/eventstore/handler/crdb/init.go b/internal/eventstore/handler/crdb/init.go index a57add8939..d8edb7cd08 100644 --- a/internal/eventstore/handler/crdb/init.go +++ b/internal/eventstore/handler/crdb/init.go @@ -203,7 +203,7 @@ func (h *StatementHandler) Init(ctx context.Context) error { return err } if !next { - logging.WithFields("projection", h.ProjectionName, "execute", i).Debug("skipping next check") + logging.WithFields("projection", h.ProjectionName, "execute", i).Debug("projection set up") break } }