Date format for build info doesn't include spaces

go 1.0.3 doesn't support spaces in -X linker options.
This commit is contained in:
Bernerd Schaefer 2013-04-25 15:07:35 +02:00
parent 9dde9302a8
commit 378e494433

View file

@ -20,16 +20,16 @@ include Makefile.INCLUDE
REV := $(shell git rev-parse --short HEAD)
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
HOSTNAME := $(shell hostname -f)
BUILD_DATE := $(shell date)
BUILD_DATE := $(shell date +%Y%m%d-%H:%M:%S)
BUILDFLAGS := -ldflags \
" -X main.buildVersion $(REV)\
-X main.buildBranch $(BRANCH)\
-X main.buildUser $(USER)@$(HOSTNAME)\
-X main.buildDate '$(BUILD_DATE)'\
-X main.goVersion '$(GO_VERSION)'\
-X main.leveldbVersion '$(LEVELDB_VERSION)'\
-X main.protobufVersion '$(PROTOCOL_BUFFERS_VERSION)'\
-X main.snappyVersion '$(SNAPPY_VERSION)'"
-X main.buildDate $(BUILD_DATE)\
-X main.goVersion $(GO_VERSION)\
-X main.leveldbVersion $(LEVELDB_VERSION)\
-X main.protobufVersion $(PROTOCOL_BUFFERS_VERSION)\
-X main.snappyVersion $(SNAPPY_VERSION)"
all: test