-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
49 lines (39 loc) · 975 Bytes
/
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: build
build:
goreleaser build --rm-dist --snapshot
.PHONY: release
release:
goreleaser release --rm-dist --snapshot --skip-publish
.PHONY: generate
generate:
go generate
.PHONY: lint
lint:
golangci-lint run \
--enable-all \
--disable=exhaustivestruct,godox,varnamelen
.PHONY: test
test:
go test -v -race -cover -coverprofile=coverage.out
.PHONY: coverage
coverage: test
go tool cover -html=coverage.out
.PHONY: tidy
tidy:
go mod tidy
go mod vendor
.PHONY: install-tools
install-tools:
go list -f '{{range .Imports}}{{.}} {{end}}' tools/tools.go | xargs go install -v
.PHONY: install-goreleaser
install-goreleaser:
go install -v github.com/goreleaser/goreleaser
.PHONY: install-golangci-lint
install-golangci-lint:
go install -v github.com/golangci/golangci-lint/cmd/golangci-lint
.PHONY: run-prometheus
run-prometheus:
docker run --rm -ti \
-v $(PWD)/test/prometheus.yml:/etc/prometheus/prometheus.yml \
-p 9090:9090 \
prom/prometheus