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

@@ -42,7 +42,7 @@ function kube::hack::build_ui() {
go-bindata -nocompress -o "${output_file}" -prefix ${PWD} -pkg "${pkg}" "${src}"
local year=$(date +%Y)
cat hack/boilerplate/boilerplate.go.txt | sed "s/YEAR/${year}/" > "${TMP_DATAFILE}"
cat hack/boilerplate/boilerplate.generatego.txt > "${TMP_DATAFILE}"
echo -e "// generated by hack/build-ui.sh; DO NOT EDIT\n" >> "${TMP_DATAFILE}"
cat "${output_file}" >> "${TMP_DATAFILE}"