-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
42 lines (30 loc) · 1.3 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
all: build test
.PHONY: all bench build checkbench clean integration savedeps servedocs test testdeps testdocs
MKDOCS_MATERIAL_VERSION = 1.10.3
VERSION = $(shell git describe --always | tr -d '\n'; test -z "`git status --porcelain`" || echo '-dirty')
bench:
@docker-compose --file internal/test/bench/docker-compose.yml up --build
build:
@CGO_ENABLED=0 go install -ldflags "-X main.version=$(VERSION)" ./cmd/timbala/
checkbench:
@go build -tags bench ./internal/test/bench
@docker-compose -f internal/test/bench/docker-compose.yml config -q
clean:
@docker-compose --file internal/test/bench/docker-compose.yml rm -f
@docker-compose --file internal/test/integration/docker-compose.yml rm -f
integration:
@docker-compose --file internal/test/integration/docker-compose.yml up --build --abort-on-container-exit
savedeps:
@dep ensure
test:
@# Disable go vet checking of methods as the Seek method from the
@# Prometheus storage.SeriesIterator interface triggers an error.
@go vet -methods=false ./...
@go test ./internal/cluster
@go test -race ./...
servedocs:
@docker run --rm -it -p 8000:8000 -v `pwd`:/docs squidfunk/mkdocs-material:$(MKDOCS_MATERIAL_VERSION)
testdeps:
@dep status 1>/dev/null
testdocs:
@docker run --rm -it -v `pwd`:/docs squidfunk/mkdocs-material:$(MKDOCS_MATERIAL_VERSION) build -s