Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
57ca909d
Unverified
Commit
57ca909d
authored
Feb 14, 2018
by
Christoph Blecker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Partial revert of
fb5caac2
parent
63380d12
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
update-codegen.sh
hack/update-codegen.sh
+25
-25
No files found.
hack/update-codegen.sh
View file @
57ca909d
...
@@ -38,7 +38,7 @@ informergen=$(kube::util::find-binary "informer-gen")
...
@@ -38,7 +38,7 @@ informergen=$(kube::util::find-binary "informer-gen")
# that generates the set-gen program.
# that generates the set-gen program.
#
#
IFS
=
" "
read
-ra
GROUP_VERSIONS
<<<
"
$KUBE_AVAILABLE_GROUP_VERSIONS
"
GROUP_VERSIONS
=(
${
KUBE_AVAILABLE_GROUP_VERSIONS
}
)
GV_DIRS
=()
GV_DIRS
=()
INTERNAL_DIRS
=()
INTERNAL_DIRS
=()
for
gv
in
"
${
GROUP_VERSIONS
[@]
}
"
;
do
for
gv
in
"
${
GROUP_VERSIONS
[@]
}
"
;
do
...
@@ -61,16 +61,8 @@ for gv in "${GROUP_VERSIONS[@]}"; do
...
@@ -61,16 +61,8 @@ for gv in "${GROUP_VERSIONS[@]}"; do
if
[[
"
${
pkg_dir
}
"
=
core/
*
]]
;
then
if
[[
"
${
pkg_dir
}
"
=
core/
*
]]
;
then
int_group
=
"api/"
int_group
=
"api/"
fi
fi
if
!
[[
"
${
INTERNAL_DIRS
[@]
:-}
"
=
~
"
${
int_group
}
"
]]
;
then
found
=
0
INTERNAL_DIRS+
=(
"
${
int_group
}
"
)
for
dir
in
"
${
INTERNAL_DIRS
[@]
}
"
;
do
if
[[
"
$dir
"
=
"
$int_group
"
]]
;
then
found
=
1
break
fi
done
if
[[
$found
=
0
]]
;
then
INTERNAL_DIRS+
=(
"
$int_group
"
)
fi
fi
done
done
# delimit by commas for the command
# delimit by commas for the command
...
@@ -82,26 +74,32 @@ INTERNAL_DIRS_CSV=$(IFS=',';echo "${INTERNAL_DIRS[*]// /,}";IFS=$)
...
@@ -82,26 +74,32 @@ INTERNAL_DIRS_CSV=$(IFS=',';echo "${INTERNAL_DIRS[*]// /,}";IFS=$)
${
clientgen
}
--input-base
=
"k8s.io/kubernetes/pkg/apis"
--input
=
"
${
INTERNAL_DIRS_CSV
}
"
"
$@
"
${
clientgen
}
--input-base
=
"k8s.io/kubernetes/pkg/apis"
--input
=
"
${
INTERNAL_DIRS_CSV
}
"
"
$@
"
${
clientgen
}
--output-base
"
${
KUBE_ROOT
}
/vendor"
--output-package
=
"k8s.io/client-go"
--clientset-name
=
"kubernetes"
--input-base
=
"k8s.io/kubernetes/vendor/k8s.io/api"
--input
=
"
${
GV_DIRS_CSV
}
"
--go-header-file
${
KUBE_ROOT
}
/hack/boilerplate/boilerplate.go.txt
"
$@
"
${
clientgen
}
--output-base
"
${
KUBE_ROOT
}
/vendor"
--output-package
=
"k8s.io/client-go"
--clientset-name
=
"kubernetes"
--input-base
=
"k8s.io/kubernetes/vendor/k8s.io/api"
--input
=
"
${
GV_DIRS_CSV
}
"
--go-header-file
${
KUBE_ROOT
}
/hack/boilerplate/boilerplate.go.txt
"
$@
"
mapfile
-t
listergen_internal_apis < <
(
listergen_internal_apis
=(
cd
"
${
KUBE_ROOT
}
"
$(
sort
<
(
find pkg/apis
-maxdepth
2
-name
types.go
-exec
dirname
{}
\;
)
cd
${
KUBE_ROOT
}
find pkg/apis
-maxdepth
2
-name
types.go | xargs
-n1
dirname
|
sort
)
)
)
listergen_internal_apis
=(
"
${
listergen_internal_apis
[@]/#/k8s.io/kubernetes/
}
"
)
listergen_internal_apis
=(
${
listergen_internal_apis
[@]/#/k8s.io/kubernetes/
}
)
listergen_internal_apis_csv
=
$(
IFS
=
,
;
echo
"
${
listergen_internal_apis
[*]
}
"
)
listergen_internal_apis_csv
=
$(
IFS
=
,
;
echo
"
${
listergen_internal_apis
[*]
}
"
)
${
listergen
}
--input-dirs
"
${
listergen_internal_apis_csv
}
"
"
$@
"
${
listergen
}
--input-dirs
"
${
listergen_internal_apis_csv
}
"
"
$@
"
mapfile
-t
listergen_external_apis < <
(
listergen_external_apis
=(
cd
"
${
KUBE_ROOT
}
/staging/src"
$(
sort
<
(
find k8s.io/api
-name
types.go
-exec
dirname
{}
\;
)
cd
${
KUBE_ROOT
}
/staging/src
find k8s.io/api
-name
types.go | xargs
-n1
dirname
|
sort
)
)
)
listergen_external_apis_csv
=
$(
IFS
=
,
;
echo
"
${
listergen_external_apis
[*]
}
"
)
listergen_external_apis_csv
=
$(
IFS
=
,
;
echo
"
${
listergen_external_apis
[*]
}
"
)
${
listergen
}
--output-base
"
${
KUBE_ROOT
}
/vendor"
--output-package
"k8s.io/client-go/listers"
--input-dirs
"
${
listergen_external_apis_csv
}
"
--go-header-file
${
KUBE_ROOT
}
/hack/boilerplate/boilerplate.go.txt
"
$@
"
${
listergen
}
--output-base
"
${
KUBE_ROOT
}
/vendor"
--output-package
"k8s.io/client-go/listers"
--input-dirs
"
${
listergen_external_apis_csv
}
"
--go-header-file
${
KUBE_ROOT
}
/hack/boilerplate/boilerplate.go.txt
"
$@
"
mapfile
-t
informergen_internal_apis < <
(
informergen_internal_apis
=(
cd
"
${
KUBE_ROOT
}
"
$(
sort
<
(
find pkg/apis
-maxdepth
2
-name
types.go
-exec
dirname
{}
\;
)
cd
${
KUBE_ROOT
}
find pkg/apis
-maxdepth
2
-name
types.go | xargs
-n1
dirname
|
sort
)
)
)
informergen_internal_apis
=(
"
${
informergen_internal_apis
[@]/#/k8s.io/kubernetes/
}
"
)
informergen_internal_apis
=(
${
informergen_internal_apis
[@]/#/k8s.io/kubernetes/
}
)
informergen_internal_apis_csv
=
$(
IFS
=
,
;
echo
"
${
informergen_internal_apis
[*]
}
"
)
informergen_internal_apis_csv
=
$(
IFS
=
,
;
echo
"
${
informergen_internal_apis
[*]
}
"
)
${
informergen
}
\
${
informergen
}
\
--input-dirs
"
${
informergen_internal_apis_csv
}
"
\
--input-dirs
"
${
informergen_internal_apis_csv
}
"
\
...
@@ -110,10 +108,12 @@ ${informergen} \
...
@@ -110,10 +108,12 @@ ${informergen} \
--go-header-file
${
KUBE_ROOT
}
/hack/boilerplate/boilerplate.go.txt
\
--go-header-file
${
KUBE_ROOT
}
/hack/boilerplate/boilerplate.go.txt
\
"
$@
"
"
$@
"
mapfile
-t
informergen_external_apis < <
(
informergen_external_apis
=(
cd
"
${
KUBE_ROOT
}
/staging/src"
$(
cd
${
KUBE_ROOT
}
/staging/src
# because client-gen doesn't do policy/v1alpha1, we have to skip it too
# because client-gen doesn't do policy/v1alpha1, we have to skip it too
sort
<
(
find k8s.io/api
-name
types.go
-exec
dirname
{}
\;
)
|
grep
-v
pkg.apis.policy.v1alpha1
find k8s.io/api
-name
types.go | xargs
-n1
dirname
|
sort
|
grep
-v
pkg.apis.policy.v1alpha1
)
)
)
informergen_external_apis_csv
=
$(
IFS
=
,
;
echo
"
${
informergen_external_apis
[*]
}
"
)
informergen_external_apis_csv
=
$(
IFS
=
,
;
echo
"
${
informergen_external_apis
[*]
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment