File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ DIR_SRC=./cmd/answer
66DOCKER_CMD =docker
77
88GO_ENV=CGO_ENABLED =0 GO111MODULE=on
9- Revision =$(shell git rev-parse --short HEAD)
9+ Revision =$(shell git rev-parse --short HEAD 2&>/dev/null || echo "" )
1010GO_FLAGS=-ldflags ="-X github.com/apache/incubator-answer/cmd.Version=$(VERSION ) -X 'github.com/apache/incubator-answer/cmd.Revision=$(Revision ) ' -X 'github.com/apache/incubator-answer/cmd.Time=` date +%s ` ' -extldflags -static"
1111GO =$(GO_ENV ) $(shell which go)
1212
Original file line number Diff line number Diff line change 4444 // Version is the version of the project
4545 Version = "0.0.0"
4646 // Revision is the git short commit revision number
47- Revision = "-"
47+ // If built without a Git repository, this field will be empty.
48+ Revision = ""
4849 // Time is the build time of the project
49- Time = "- "
50+ Time = ""
5051 // GoVersion is the go version of the project
5152 GoVersion = "1.19"
5253 // log level
You can’t perform that action at this time.
0 commit comments