Skip to content

Commit

Permalink
Add git revision to the linker provided build info.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqx0r committed Jun 28, 2017
1 parent 71886f0 commit 0b263d6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Expand Up @@ -64,10 +64,11 @@ all: mtail
clean:
rm -f $(CLEANFILES) .*dep-stamp

tags := $(shell git describe --tags)
version := $(shell git describe --tags)
revision := $(shell git rev-parse HEAD)

install mtail: $(GOFILES) .dep-stamp
go install -ldflags "-X main.version=${tags}"
go install -ldflags "-X main.version=${version} -X main.revision=${revision}"

vm/parser.go: vm/parser.y .gen-dep-stamp
go generate -x ./vm
Expand Down

0 comments on commit 0b263d6

Please sign in to comment.