-
Notifications
You must be signed in to change notification settings - Fork 236
/
Copy pathMakefile
49 lines (37 loc) · 1.34 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.PHONY: plugins
GOPATH0 := $(firstword $(subst :, ,$(GOPATH)))
UTIL_PATH := github.com/alpacahq/marketstore/utils
all:
go install -ldflags "-s -X $(UTIL_PATH).Tag=$(DOCKER_TAG) -X $(UTIL_PATH).BuildStamp=$(shell date -u +%Y-%m-%d-%H-%M-%S) -X $(UTIL_PATH).GitHash=$(shell git rev-parse HEAD)" ./...
install: all
generate:
make -C sqlparser
go generate $(shell find . -path ./vendor -prune -o -name \*.go -exec grep -q go:generate {} \; -print | while read file; do echo `dirname $$file`; done | xargs)
vendor:
go mod vendor
update:
go mod tidy
plugins:
$(MAKE) -C contrib/ondiskagg
$(MAKE) -C contrib/gdaxfeeder
$(MAKE) -C contrib/slait
$(MAKE) -C contrib/stream
$(MAKE) -C contrib/polygon
$(MAKE) -C contrib/bitmexfeeder
$(MAKE) -C contrib/binancefeeder
$(MAKE) -C contrib/iex
unittest: install
go fmt ./...
go test ./...
$(MAKE) -C tests/integ test
image:
docker build -t alpacamarkets/marketstore.test .
runimage:
make -C tests/integ run IMAGE_NAME=alpacamarkets/marketstore.test
stopimage:
make -C tests/integ clean IMAGE_NAME=alpacamarkets/marketstore.test
push:
docker build --build-arg tag=$(DOCKER_TAG) -t alpacamarkets/marketstore:$(DOCKER_TAG) -t alpacamarkets/marketstore:latest .
docker login -u $(DOCKER_USER) -p $(DOCKER_PASS)
docker push alpacamarkets/marketstore:$(DOCKER_TAG)
docker push alpacamarkets/marketstore:latest