forked from quay/container-security-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (37 loc) · 1020 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
39
40
41
42
43
44
45
GOPKG = github.com/quay/container-security-operator
GENDIR = /tmp/code-generator
.PHONY: all
all: install
.PHONY: build
build:
go build -v -o bin/security-labeller ./cmd/security-labeller
.PHONY: run
run: build
./bin/security-labeller -kubeconfig ~/.kube/config -config example/example-config.yaml
.PHONY: installcrds
installcrds:
kubectl create -f bundle/imagemanifestvuln.crd.yaml
.PHONY: get-code-generator
get-code-generator:
rm -rf $(GENDIR) || true
git clone --depth=1 \
--branch v0.24.0 \
https://github.com/kubernetes/code-generator.git \
$(GENDIR)
.PHONY: devenv
devenv: installcrds
kubectl apply -f bundle/examples/
.PHONY: vendor
vendor:
go mod vendor
.PHONY: codegen
codegen:
$(GENDIR)/generate-groups.sh all \
$(GOPKG)/generated \
$(GOPKG) \
apis/secscan:v1alpha1\
--go-header-file=$(GENDIR)/hack/boilerplate.go.txt \
--output-base=/tmp
mv /tmp/$(GOPKG)/apis/secscan/v1alpha1/zz_generated.deepcopy.go apis/secscan/v1alpha1/
rm -rf generated
mv /tmp/$(GOPKG)/generated .