From cef7a1aae4205ebf4fbd8958f1f870ff69759edf Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 16 Sep 2015 17:37:11 -0700 Subject: PLT-92 Adding server side versioning to the binary --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index cd82c27a3..a6541b748 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ GOPATH ?= $(GOPATH:) GOFLAGS ?= $(GOFLAGS:) BUILD_NUMBER ?= $(BUILD_NUMBER:) +BUILD_DATE=`date +'%y.%m.%d %H:%M:%S'` GO=$(GOPATH)/bin/godep go ESLINT=node_modules/eslint/bin/eslint.js @@ -40,6 +41,9 @@ travis: @echo Checking for style guide compliance cd web/react && $(ESLINT) --quiet components/* dispatcher/* pages/* stores/* utils/* + @sed -i'.bak' 's|_BUILD_NUMBER_|$(BUILD_NUMBER)|g' ./model/version.go + @sed -i'.bak' 's|_BUILD_DATE_|$(BUILD_DATE)|g' ./model/version.go + @$(GO) build $(GOFLAGS) ./... @$(GO) install $(GOFLAGS) ./... @@ -204,6 +208,9 @@ cleandb: fi dist: install + @sed -i'.bak' 's|_BUILD_NUMBER_|$(BUILD_NUMBER)|g' ./model/version.go + @sed -i'.bak' 's|_BUILD_DATE_|$(BUILD_DATE)|g' ./model/version.go + @$(GO) build $(GOFLAGS) -i ./... @$(GO) install $(GOFLAGS) ./... -- cgit v1.2.3-1-g7c22