-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathMakefile
52 lines (40 loc) · 1.32 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
50
51
52
VERSION ?= 0.1.10
.PHONY: prepare
prepare:
docker login
.PHONY: deps
deps:
go get -v github.com/vitkovskii/insane-doc@v0.0.1
.PHONY: test
test:
go test ./fd/ -v -count 1
go test ./pipeline/ -v -count 1
go test ./plugin/... -v -count 1
.PHONY: test-e2e
test-e2e:
go test ./cmd/ -v -count 1
.PHONY: bench-file
bench-file:
go test -bench LightJsonReadPar ./plugin/input/file -v -count 1 -run -benchmem -benchtime 1x
.PHONY: gen-doc
gen-doc:
insane-doc
.PHONY: profile-file
profile-file:
go test -bench LightJsonReadPar ./plugin/input/file -v -count 1 -run -benchmem -benchtime 1x -cpuprofile cpu.pprof -memprofile mem.pprof -mutexprofile mutex.pprof
.PHONY: push-version-linux-amd64
push-version-linux-amd64:
GOOS=linux GOARCH=amd64 go build -v -o file.d ./cmd/file.d.go
docker build -t ozonru/file.d:${VERSION}-linux-amd64 .
docker push ozonru/file.d:${VERSION}-linux-amd64
.PHONY: push-latest-linux-amd64
push-latest-linux-amd64:
GOOS=linux GOARCH=amd64 go build -v -o file.d ./cmd/file.d.go
docker build -t ozonru/file.d:latest-linux-amd64 .
docker push ozonru/file.d:latest-linux-amd64
.PHONY: push-images-version
push-images-version: prepare push-version-linux-amd64
.PHONY: push-images-latest
push-images-latest: prepare push-latest-linux-amd64
.PHONY: push-images-all
push-images-all: push-images-version push-images-latest