-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
33 lines (27 loc) · 857 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
CONTROLLER_GEN_HOME := /tmp/controller-gen
CONTROLLER_GEN_VERSION := v0.13.0
#
# Schema targets.
#
.PHONY: schema.install-tools
schema.install-tools:
mkdir -p $(CONTROLLER_GEN_HOME);\
export GOBIN=$(CONTROLLER_GEN_HOME);\
go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION);\
.PHONY: schema.generate
schema.generate:
$(CONTROLLER_GEN_HOME)/controller-gen \
crd:ignoreUnexportedFields=true,headerFile=pkg/merger/schema/header.yaml \
paths=./... output:crd:dir=pkg/merger/schema; \
sed -e 's/CustomResourceDefinition/KRMFunctionDefinition/g' \
-e 's|apiextensions.k8s.io/v1|config.kubernetes.io/v1alpha1|g' \
-i pkg/merger/schema/generators.kustomize.devopshive.net_mergers.yaml
#
# Golang targets.
#
.PHONY: go.build
go.build:
go build -o './dist/' .
.PHONY: go.format
go.format:
gofumpt -l -w .