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):