add build time (#763)
This commit is contained in:
committed by
Kota Kanbe
parent
4b49e11a33
commit
7c4831d2d1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user