forked from andrewrynhard/k8s-argus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (23 loc) · 799 Bytes
/
Makefile
File metadata and controls
32 lines (23 loc) · 799 Bytes
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
NAMESPACE := logicmonitor
REPOSITORY := argus
VERSION ?= $(shell git describe --tags --always --dirty)
default: build
lint:
ifeq ($(shell uname -s), Darwin)
find pkg/ -type f | grep go | egrep -v "mocks|gomock" | xargs gofmt -l -d -s -w
find pkg/ -type f | grep go | egrep -v "mocks|gomock" | xargs goimports -l -d -w
endif
build: lint
docker build --build-arg VERSION=$(VERSION) -t $(NAMESPACE)/$(REPOSITORY):$(VERSION) .
dev: lint
docker build --build-arg VERSION=$(VERSION) -t $(NAMESPACE)/$(REPOSITORY):$(VERSION) -f Dockerfile.dev .
mockgen:
go generate ./...
test: mockgen lint
go test ./... -v -coverprofile=coverage.txt -race
go tool cover -html=coverage.txt -o coverage.html
devsetup:
go get github.com/golang/mock/mockgen
.PHONY: docs
docs:
cd docs/source && hugo