summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
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) ./...