-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (35 loc) · 1.09 KB
/
Makefile
File metadata and controls
42 lines (35 loc) · 1.09 KB
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
# Go itself
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
# Flags for local go
GOFLAGS=-a
# The Executables
EXECUTABLES=mwsapid mwsquery elasticquery elasticsync temaquery
all: test build
.PHONY : all build test integrationtest integrationpull clean deps testdeps
build: $(EXECUTABLES)
$(EXECUTABLES): %: deps
CGO_ENABLED=0 $(GOBUILD) $(GOFLAGS) ./cmd/$@
test: testdeps
CGO_ENABLED=0 $(GOTEST) -short -v ./...
bench: testdeps
CGO_ENABLED=0 $(GOTEST) -short -bench=. ./...
clean:
$(GOCLEAN)
rm -f integrationtest/testdata/lockfile
rm -f $(EXECUTABLES)
deps:
$(GOGET) -v ./...
testdeps:
$(GOGET) -v -t ./...
# Integration Tests
integrationdeps:
cd integrationtest/testdata && docker-compose -f docker-compose-elasticquery.yml pull
cd integrationtest/testdata && docker-compose -f docker-compose-elasticsync.yml pull
cd integrationtest/testdata && docker-compose -f docker-compose-mwsquery.yml pull
cd integrationtest/testdata && docker-compose -f docker-compose-temaquery.yml pull
integrationtest: testdeps
CGO_ENABLED=0 $(GOTEST) -v -p 1 ./cmd/...