-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (40 loc) · 783 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
50
51
52
53
54
55
56
# Container tool to use to build images.
CONTAINER_TOOL ?= docker
# Binary name to use when building the binary.
BINARY ?= kubert
# Image name to use when building images.
IMG ?= kubert:latest
.PHONY: all
all: build
##@ Development
.PHONY: fmt
fmt:
go fmt ./...
.PHONY: vet
vet:
go vet ./...
.PHONY: test
test:
go test -v ./...
##@ Build
.PHONY: build
build: fmt vet
go build -o bin/${BINARY} main.go
.PHONY: run
run: fmt vet
go run main.go $(filter-out $@,$(MAKECMDGOALS))
%:
@:
.PHONY: docker-build
docker-build:
$(CONTAINER_TOOL) build -t ${IMG} .
.PHONY: docker-push
docker-push:
$(CONTAINER_TOOL) push ${IMG}
##@ Utils
.PHONY: docs
docs:
go run tools/docs.go
.PHONY: generate-default-config
generate-default-config:
go run tools/generate_default_cfg.go