add build time (#763)

This commit is contained in:
Takayuki Ushida
2019-01-18 13:13:50 +09:00
committed by Kota Kanbe
parent 4b49e11a33
commit 7c4831d2d1

View File

@@ -18,8 +18,9 @@ SRCS = $(shell git ls-files '*.go')
PKGS = $(shell go list ./...)
VERSION := $(shell git describe --tags --abbrev=0)
REVISION := $(shell git rev-parse --short HEAD)
BUILDTIME := $(shell date "+%Y%m%d_%H%M%S")
LDFLAGS := -X 'github.com/future-architect/vuls/config.Version=$(VERSION)' \
-X 'github.com/future-architect/vuls/config.Revision=$(REVISION)'
-X 'github.com/future-architect/vuls/config.Revision=$(BUILDTIME)_$(REVISION)'
all: dep build