diff --git a/.gitignore b/.gitignore index d2a0b5929..57e884834 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ deps/ **/*.enterprise.go **/enterprise/** enterprise.mk -local/ \ No newline at end of file +local/ +tools/codegen/boilerplate.go.txt \ No newline at end of file diff --git a/Makefile b/Makefile index 3d3812474..264198137 100644 --- a/Makefile +++ b/Makefile @@ -189,7 +189,7 @@ GOLANGCI_ENABLED=deadcode gosimple govet ineffassign staticcheck structcheck typ .PHONY: license-verify license-verify: @echo ">> Verify license of files" - @$(GOPATH)/bin/addlicense -f "./tools/codegen/boilerplate.go.txt" -check $(SOURCES) + @$(GOPATH)/bin/addlicense -f "./tools/codegen/license-header.txt" -check $(SOURCES) .PHONY: fmt fmt: @@ -199,7 +199,7 @@ fmt: .PHONY: license license: @echo ">> Ensuring license of files" - @$(GOPATH)/bin/addlicense -f "./tools/codegen/boilerplate.go.txt" $(SOURCES) + @$(GOPATH)/bin/addlicense -f "./tools/codegen/license-header.txt" $(SOURCES) .PHONY: fmt-verify fmt-verify: license-verify @@ -245,6 +245,7 @@ update-generated: @rm -fr $(ORGDIR) @mkdir -p $(ORGDIR) @ln -s -f $(SCRIPTDIR) $(ORGDIR)/kube-arangodb + @sed -e 's/^/\/\/ /' -e 's/ *$$//' $(ROOTDIR)/tools/codegen/license-header.txt > $(ROOTDIR)/tools/codegen/boilerplate.go.txt GOPATH=$(GOBUILDDIR) $(VENDORDIR)/k8s.io/code-generator/generate-groups.sh \ "all" \ "github.com/arangodb/kube-arangodb/pkg/generated" \ diff --git a/tools/codegen/boilerplate.go.txt b/tools/codegen/boilerplate.go.txt deleted file mode 100644 index 4d60a0ed8..000000000 --- a/tools/codegen/boilerplate.go.txt +++ /dev/null @@ -1,19 +0,0 @@ -// -// DISCLAIMER -// -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Copyright holder is ArangoDB GmbH, Cologne, Germany -// diff --git a/tools/codegen/license-header.txt b/tools/codegen/license-header.txt new file mode 100644 index 000000000..58980cbcc --- /dev/null +++ b/tools/codegen/license-header.txt @@ -0,0 +1,19 @@ + +DISCLAIMER + +Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Copyright holder is ArangoDB GmbH, Cologne, Germany +