Add git commit to version output

This commit is contained in:
2021-03-10 21:39:47 -06:00
parent 1a7b665376
commit 94cc596afa
3 changed files with 18 additions and 8 deletions

View File

@ -12,9 +12,11 @@ else
endif
LUME_VERSION ?= $(shell git describe --tags --always)
GIT_COMMIT := $(shell git rev-parse --short HEAD)
LDFLAGS := $(LDFLAGS) \
-X git.kill0.net/chill9/lume/cmd.Version=$(LUME_VERSION) \
-X git.kill0.net/chill9/lume/cmd.BuildDate=$(BUILD_DATE)
-X git.kill0.net/chill9/lume/cmd.BuildDate=$(BUILD_DATE) \
-X git.kill0.net/chill9/lume/cmd.GitCommit=$(GIT_COMMIT)
.PHONY: build
build: