forked from integr8ly/cloud-resource-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (31 loc) · 786 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
NAMESPACE=cloud-resource-operator
VERSION=0.1.0
.PHONY: build
build:
go build cmd/manager/main.go
.PHONY: run
run:
operator-sdk up local --namespace=""
.PHONY: code/gen
code/gen:
operator-sdk generate k8s
operator-sdk generate openapi
@go generate ./...
.PHONY: code/fix
code/fix:
@go mod tidy
@gofmt -w `find . -type f -name '*.go' -not -path "./vendor/*"`
.PHONY: cluster/prepare
cluster/prepare:
oc new-project $(NAMESPACE) || true
oc apply -f ./deploy/crds/*_crd.yaml
oc apply -f ./deploy/examples/
oc apply -f ./deploy/crds/*_cr.yaml -n $(NAMESPACE)
.PHONY: cluster/clean
cluster/clean:
oc delete -f ./deploy/crds/*_crd.yaml
oc delete project $(NAMESPACE)
.PHONY: test/unit
test/unit:
@echo Running tests:
go test -v -race -coverprofile=coverage.out ./pkg/...