Skip to content

Commit fc412a5

Browse files
authored
chore: update Makefile recipes (#92)
1 parent 7be8c77 commit fc412a5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
VERSION ?= $(shell git describe --tags --always --match=v* 2> /dev/null || cat $(CURDIR)/.version 2> /dev/null || echo v0)
2+
VERSION_HASH = $(shell git rev-parse HEAD)
3+
4+
MODULE = $(shell env GO111MODULE=on go list -m)
5+
16
LDFLAGS += -X "$(MODULE)/version.Version=$(VERSION)" -X "$(MODULE)/version.CommitSHA=$(VERSION_HASH)"
27

38
go = GOGC=off go

0 commit comments

Comments
 (0)