mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-25 12:17:52 +00:00
Speed up update-swagger-docs
Only build genswaggertypedocs once per run instead of per-package Speeds up the script from ~1:10 to ~0:18
This commit is contained in:
@@ -51,7 +51,12 @@ kube::swagger::gen_types_swagger_doc() {
|
||||
EOF
|
||||
} > "${TMPFILE}"
|
||||
|
||||
go run cmd/genswaggertypedocs/swagger_type_docs.go -s \
|
||||
if ! which genswaggertypedocs >/dev/null; then
|
||||
# build if needed
|
||||
go install k8s.io/kubernetes/cmd/genswaggertypedocs
|
||||
fi
|
||||
|
||||
genswaggertypedocs -s \
|
||||
"${gv_dir}/types.go" \
|
||||
-f - \
|
||||
>> "${TMPFILE}"
|
||||
|
Reference in New Issue
Block a user