-
Notifications
You must be signed in to change notification settings - Fork 16
/
generate-client.sh
executable file
·34 lines (28 loc) · 1.31 KB
/
generate-client.sh
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
#!/bin/bash
source kube_codegen.sh
mkdir -p pkg/client/clientset
mkdir -p pkg/client/listers
mkdir -p pkg/client/informers
kube::codegen::gen_helpers \
--input-pkg-root github.com/hobbyfarm/gargantua/pkg/apis \
--output-base "${GOPATH}"/src
kube::codegen::gen_client \
--input-pkg-root github.com/hobbyfarm/gargantua/pkg/apis \
--output-pkg-root github.com/hobbyfarm/gargantua/pkg/client \
--boilerplate ./hack/boilerplate.go.txt \
--output-base "${GOPATH}"/src \
--clientset-name clientset \
--versioned-name versioned \
--listers-name listers \
--informers-name informers \
--with-watch
kube::codegen::gen_helpers \
--input-pkg-root github.com/hobbyfarm/gargantua/pkg/property \
--output-base "${GOPATH}"/src 2>&1 | grep -v -e "GenericType"
# The previous command ignores any lines w/ string GenericType
# This is to suppress a warning about deepcopy-gen not being able to support a generic type
# used as a type constraint. This shouldn't affect anything and is only cosmetic for developers
# to not worry about the error.
# The error is logged below for posterity.
#
# W0523 16:50:47.161458 74104 parse.go:862] Making unsupported type entry "GenericType" for: &types.TypeParam{check:(*types.Checker)(nil), id:0x2, obj:(*types.TypeName)(0x140086f8f00), index:0, bound:(*types.Interface)(0x140000c0aa0)}