Merge pull request #59172 from fisherxu/removeyear

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove YEAR field of all generated files and fix kubernetes boilerplate checker

**What this PR does / why we need it**:
Remove YEAR field of all generated files and fix kubernetes boilerplate checker
xref: [remove YEAR fileds in gengo #91](https://github.com/kubernetes/gengo/pull/91)

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes [#gengo/issues/24](https://github.com/kubernetes/gengo/issues/24)

**Special notes for your reviewer**:
/cc @thockin @lavalamp @sttts 

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2018-03-21 12:44:37 -07:00
committed by GitHub
1551 changed files with 1798 additions and 1693 deletions

View File

@@ -71,8 +71,7 @@ function kube::protoc::format() {
local package=${1}
# Update boilerplate for the generated file.
echo "$(cat hack/boilerplate/boilerplate.go.txt ${package}/api.pb.go)" > ${package}/api.pb.go
sed -i".bak" "s/Copyright YEAR/Copyright $(date '+%Y')/g" ${package}/api.pb.go
echo "$(cat hack/boilerplate/boilerplate.generatego.txt ${package}/api.pb.go)" > ${package}/api.pb.go
# Run gofmt to clean up the generated code.
kube::golang::verify_go_version

View File

@@ -34,7 +34,7 @@ kube::swagger::gen_types_swagger_doc() {
echo "Generating swagger type docs for ${group_version} at ${gv_dir}"
sed 's/YEAR/2016/' hack/boilerplate/boilerplate.go.txt > "$TMPFILE"
echo -e "$(cat hack/boilerplate/boilerplate.generatego.txt)\n" > "$TMPFILE"
echo "package ${group_version##*/}" >> "$TMPFILE"
cat >> "$TMPFILE" <<EOF
@@ -48,7 +48,7 @@ kube::swagger::gen_types_swagger_doc() {
//
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
// AUTO-GENERATED FUNCTIONS START HERE
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
EOF
go run cmd/genswaggertypedocs/swagger_type_docs.go -s \