forked from openshift/cluster-dns-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
74 lines (56 loc) · 1.3 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.PHONY: all
all: generate build
PACKAGE=github.com/openshift/cluster-dns-operator
MAIN_PACKAGE=$(PACKAGE)/cmd/dns-operator
BIN=$(lastword $(subst /, ,$(MAIN_PACKAGE)))
IMAGE_TAG=openshift/origin-cluster-dns-operator
GO=GO111MODULE=on GOFLAGS=-mod=vendor go
GO_BUILD_RECIPE=CGO_ENABLED=0 $(GO) build -o $(BIN) $(MAIN_PACKAGE)
.PHONY: build
build:
$(GO_BUILD_RECIPE)
.PHONY: buildconfig
buildconfig:
hack/create-buildconfig.sh
.PHONY: cluster-build
cluster-build:
hack/start-build.sh
.PHONY: generate
generate: bindata crd
.PHONY: bindata
bindata:
hack/update-generated-bindata.sh
.PHONY: crd
crd:
hack/update-generated-crd.sh
.PHONY: verify-bindata
verify-bindata:
hack/verify-generated-bindata.sh
.PHONY: verify-crd
verify-crd:
hack/verify-generated-crd.sh
.PHONY: test
test: verify
$(GO) test ./...
.PHONY: release-local
release-local:
MANIFESTS=$(shell mktemp -d) hack/release-local.sh
.PHONY: test-e2e
test-e2e:
KUBERNETES_CONFIG="$(KUBECONFIG)" $(GO) test -v -tags e2e ./...
.PHONY: verify
verify: verify-bindata verify-crd
hack/verify-gofmt.sh
.PHONY: local-image
local-image:
ifdef USE_BUILDAH
@echo " - Building with buildah ... "
buildah bud -t $(IMAGE_TAG) .
else
@echo " - Building with docker ... "
docker build -t $(IMAGE_TAG) .
endif
.PHONY: clean
clean:
$(GO) clean
rm -f $(BIN)