forked from vmware-archive/kubewatch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (23 loc) · 648 Bytes
/
Makefile
File metadata and controls
34 lines (23 loc) · 648 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
33
34
.PHONY: default build builder-image binary-image test stop clean-images clean
BUILDER = kubewatch-builder
BINARY = kubewatch
VERSION=
BUILD=
GOCMD = go
GOFLAGS ?= $(GOFLAGS:)
LDFLAGS =
default: build test
build:
"$(GOCMD)" build ${GOFLAGS} ${LDFLAGS} -o "${BINARY}"
builder-image:
@docker build -t "${BUILDER}" -f Dockerfile.build .
binary-image: builder-image
@docker run --rm "${BUILDER}" | docker build -t "${BINARY}" -f Dockerfile.run -
test:
"$(GOCMD)" test -race -v $(shell go list ./... | grep -v '/vendor/')
stop:
@docker stop "${BINARY}"
clean-images: stop
@docker rmi "${BUILDER}" "${BINARY}"
clean:
"$(GOCMD)" clean -i