forked from openshift/cluster-image-registry-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (46 loc) · 1.56 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
IMAGE ?= docker.io/openshift/origin-cluster-image-registry-operator
TAG ?= latest
PROG := cluster-image-registry-operator
GOLANGCI_LINT = _output/tools/golangci-lint
GOLANGCI_LINT_CACHE = $(PWD)/_output/golangci-lint-cache
GOLANGCI_LINT_VERSION = v1.51.0
GO_REQUIRED_MIN_VERSION = 1.16
include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \
targets/help.mk \
targets/golang/verify-update.mk \
targets/openshift/deps.mk \
targets/openshift/operator/profile-manifests.mk \
)
$(call add-profile-manifests,manifests,./profile-patches,./manifests)
all: build build-image verify
.PHONY: all
build:
./hack/build/build.sh
.PHONY: build
build-image:
docker build -t "$(IMAGE):$(TAG)" .
.PHONY: build-image
test: test-unit test-e2e
.PHONY: test
test-unit:
./hack/test-go.sh ./cmd/... ./pkg/... ./test/framework/...
.PHONY: test-unit
test-e2e:
./hack/test-go.sh -count 1 -timeout 110m -v$${WHAT:+ -run="$$WHAT"} ./test/e2e/
.PHONY: test-e2e
verify: verify-gofmt verify-deps
.PHONY: verify
$(GOLANGCI_LINT):
if [ ! -e $@ ] || ! $@ --version | grep -q $(patsubst v%,%,$(GOLANGCI_LINT_VERSION)); then \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(dir $@) $(GOLANGCI_LINT_VERSION); \
fi
.PHONY: $(GOLANGCI_LINT)
verify-golangci-lint: $(GOLANGCI_LINT)
GOLANGCI_LINT_CACHE=$(GOLANGCI_LINT_CACHE) $(GOLANGCI_LINT) run --timeout=300s ./cmd/... ./pkg/... ./test/...
verify: verify-golangci-lint
.PHONY: verify-golangci-lint
update: update-gofmt
.PHONY: update
clean:
rm -rf tmp
.PHONY: clean