Skip to content

Commit d7747d9

Browse files
authored
Merge pull request #19 from mikkeloscar/update-code-generation
Update code generation to be more robust
2 parents 8ed8701 + 8efa725 commit d7747d9

File tree

5 files changed

+29
-0
lines changed

5 files changed

+29
-0
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ require (
2727
github.com/stretchr/testify v1.2.2
2828
golang.org/x/net v0.0.0-20190311183353-d8887717615a // indirect
2929
golang.org/x/oauth2 v0.0.0-20190115181402-5dab4167f31c // indirect
30+
golang.org/x/sync v0.0.0-20190423024810-112230192c58 // indirect
3031
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 // indirect
3132
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
3233
gopkg.in/alecthomas/kingpin.v2 v2.2.6

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ golang.org/x/oauth2 v0.0.0-20190115181402-5dab4167f31c h1:pcBdqVcrlT+A3i+tWsOROF
6464
golang.org/x/oauth2 v0.0.0-20190115181402-5dab4167f31c/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
6565
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
6666
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
67+
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
68+
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
6769
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
6870
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
6971
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=

hack/update-codegen.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@ CUSTOM_RESOURCE_VERSION="v1"
2525

2626
SCRIPT_ROOT="$(dirname "${BASH_SOURCE[0]}")/.."
2727

28+
# special setup for go modules
29+
CODE_GEN_K8S_VERSION="c2090bec4d9b1fb25de3812f868accc2bc9ecbae" # 1.13.5 (https://github.com/kubernetes/code-generator/releases/tag/kubernetes-1.13.5)
30+
packages=(
31+
defaulter-gen
32+
client-gen
33+
lister-gen
34+
informer-gen
35+
deepcopy-gen
36+
)
37+
mkdir -p build
38+
for pkg in "${packages[@]}"; do
39+
go get "k8s.io/code-generator/cmd/${pkg}@${CODE_GEN_K8S_VERSION}"
40+
done
2841
# use vendor/ as a temporary stash for code-generator.
2942
rm -rf "${SCRIPT_ROOT}/vendor/k8s.io/code-generator"
3043
rm -rf "${SCRIPT_ROOT}/vendor/k8s.io/gengo"

pkg/client/clientset/versioned/clientset.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/fake/clientset_generated.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)