summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJack <jackdeng@gmail.com>2015-09-22 08:16:51 -0700
committerJack <jackdeng@gmail.com>2015-09-22 08:16:51 -0700
commit602bed85f2b32733f73e2edddb542fa36baac462 (patch)
tree06a6ee9b609a9122bc2f0e6f6e6300f9ba79a3aa /Makefile
parenta31868336f97a91bfd5a7e91e99a9b294d131f90 (diff)
parentf439c82d7c885b4c530ba9da0a41b17910743b55 (diff)
downloadchat-602bed85f2b32733f73e2edddb542fa36baac462.tar.gz
chat-602bed85f2b32733f73e2edddb542fa36baac462.tar.bz2
chat-602bed85f2b32733f73e2edddb542fa36baac462.zip
fix conflict
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 972ebe960..4459da9dd 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,8 @@
GOPATH ?= $(GOPATH:)
GOFLAGS ?= $(GOFLAGS:)
BUILD_NUMBER ?= $(BUILD_NUMBER:)
+BUILD_DATE = $(shell date -u)
+BUILD_HASH = $(shell git rev-parse HEAD)
GO=$(GOPATH)/bin/godep go
ESLINT=node_modules/eslint/bin/eslint.js
@@ -32,6 +34,11 @@ all: travis
travis:
@echo building for travis
+ if [ "$(TRAVIS_DB)" = "postgres" ]; then \
+ sed -i'.bak' 's|mysql|postgres|g' config/config.json; \
+ sed -i'.bak' 's|mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8|postgres://mmuser:mostest@dockerhost:5432/mattermost_test?sslmode=disable\&connect_timeout=10|g' config/config.json; \
+ fi
+
rm -Rf $(DIST_ROOT)
@$(GO) clean $(GOFLAGS) -i ./...
@@ -49,6 +56,10 @@ travis:
exit 1; \
fi
+ @sed -i'.bak' 's|_BUILD_NUMBER_|$(BUILD_NUMBER)|g' ./model/version.go
+ @sed -i'.bak' 's|_BUILD_DATE_|$(BUILD_DATE)|g' ./model/version.go
+ @sed -i'.bak' 's|_BUILD_HASH_|$(BUILD_HASH)|g' ./model/version.go
+
@$(GO) build $(GOFLAGS) ./...
@$(GO) install $(GOFLAGS) ./...
@@ -222,6 +233,10 @@ 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
+ @sed -i'.bak' 's|_BUILD_HASH_|$(BUILD_HASH)|g' ./model/version.go
+
@$(GO) build $(GOFLAGS) -i ./...
@$(GO) install $(GOFLAGS) ./...