embed git revision

This commit is contained in:
itchyny 2020-01-08 01:06:42 +09:00
parent afe86778a9
commit 06dd54fc4e

View file

@ -1,7 +1,8 @@
BIN := mmv
VERSION := $$(make -s show-version)
VERSION_PATH := cmd/$(BIN)
BUILD_LDFLAGS := "-s -w"
CURRENT_REVISION := $(shell git rev-parse --short HEAD)
BUILD_LDFLAGS := "-s -w -X main.revision=$(CURRENT_REVISION)"
GOBIN ?= $(shell go env GOPATH)/bin
export GO111MODULE=on