add boilerplate.generatego.txt and let all code-generators use it

remove YEAR field in boilerplate under staging

add Do Not Edit for types_swagger_doc and add apiextensions-apiserver's example in codegen.sh
This commit is contained in:
fisherxu
2018-01-22 20:37:37 +08:00
parent c6d0726df8
commit 32319d6ef7
14 changed files with 34 additions and 20 deletions

View File

@@ -54,8 +54,7 @@ PATH="${gogopath}:${PATH}" \
--gogo_out=plugins=grpc:${KUBE_KMS_GRPC_ROOT} ${KUBE_KMS_GRPC_ROOT}/service.proto
# Update boilerplate for the generated file.
echo "$(cat hack/boilerplate/boilerplate.go.txt ${KUBE_KMS_GRPC_ROOT}/service.pb.go)" > ${KUBE_KMS_GRPC_ROOT}/service.pb.go
sed -i".bak" "s/Copyright YEAR/Copyright $(date '+%Y')/g" ${KUBE_KMS_GRPC_ROOT}/service.pb.go
echo "$(cat hack/boilerplate/boilerplate.generatego.txt ${KUBE_KMS_GRPC_ROOT}/service.pb.go)" > ${KUBE_KMS_GRPC_ROOT}/service.pb.go
# Run gofmt to clean up the generated code.
kube::golang::verify_go_version