From 9a94a9891843522f0cf4bef245421a1eba6cd5d2 Mon Sep 17 00:00:00 2001 From: Chia Automation Date: Sat, 9 Mar 2024 02:18:20 +0000 Subject: [PATCH] Update go-makefile --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 500754d..2af269e 100644 --- a/Makefile +++ b/Makefile @@ -25,8 +25,9 @@ all: fmt lint vet build .PHONY: build build: $(BIN) ; $(info $(M) building executable…) @ ## Build program binary $Q CGO_ENABLED=0 $(GO) build \ + -ldflags "-X main.gitVersion=$$(git describe --tags) -X \"main.buildTime=$$(date -u '+%Y-%m-%d %H:%M:%S %Z')\"" \ -tags release \ - -o $(BIN)/$(notdir $(basename $(MODULE)))$(binext) main.go + -o $(BIN)/$(notdir $(basename $(MODULE)))$(binext) # Tools $(BIN):