From 1b09587c2c43d9576b700fb00f5c8a49c0245870 Mon Sep 17 00:00:00 2001 From: Balazs Nadasdi Date: Fri, 11 Nov 2022 15:44:00 +0100 Subject: [PATCH] chore(gen): add license information to individual files Related to #25 --- Makefile | 13 +++++++++++++ api/v1alpha1/componentdescriptor_types.go | 19 ++++--------------- api/v1alpha1/componentversion_types.go | 19 ++++--------------- api/v1alpha1/configuration_types.go | 19 ++++--------------- api/v1alpha1/groupversion_info.go | 19 ++++--------------- api/v1alpha1/localization_types.go | 19 ++++--------------- api/v1alpha1/resource_types.go | 19 ++++--------------- api/v1alpha1/snapshot_types.go | 19 ++++--------------- api/v1alpha1/zz_generated.deepcopy.go | 19 ++++--------------- controllers/build_tar.go | 4 ++++ .../componentversion_contoller_test.go | 4 ++++ controllers/componentversion_controller.go | 19 ++++--------------- controllers/configuration_controller.go | 19 ++++--------------- controllers/get_component_descriptor.go | 4 ++++ controllers/get_component_descriptor_test.go | 4 ++++ controllers/get_resource.go | 4 ++++ controllers/get_unstructured_object.go | 4 ++++ controllers/localization_controller.go | 19 ++++--------------- controllers/resource_controller.go | 19 ++++--------------- controllers/snapshot_controller.go | 19 ++++--------------- controllers/suite_test.go | 19 ++++--------------- main.go | 19 ++++--------------- pkg/configdata/configdata.go | 4 ++++ pkg/ocm/ocm.go | 4 ++++ pkg/registry/registry.go | 3 ++- 25 files changed, 107 insertions(+), 226 deletions(-) diff --git a/Makefile b/Makefile index 841ebe3f..a588bb11 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Gardener contributors. +# +# SPDX-License-Identifier: Apache-2.0 # Image URL to use all building/pushing image targets IMG ?= controller:latest @@ -131,3 +134,13 @@ $(CONTROLLER_GEN): $(LOCALBIN) envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. $(ENVTEST): $(LOCALBIN) GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest + +.PHONY: generate-license +generate-license: + for f in $(shell find . -name "*.go" -o -name "*.sh"); do \ + reuse addheader -r \ + --copyright="SAP SE or an SAP affiliate company and Open Component Model contributors." \ + --license="Apache-2.0" \ + $$f \ + --skip-unrecognised; \ + done diff --git a/api/v1alpha1/componentdescriptor_types.go b/api/v1alpha1/componentdescriptor_types.go index b6a60022..ca539892 100644 --- a/api/v1alpha1/componentdescriptor_types.go +++ b/api/v1alpha1/componentdescriptor_types.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/api/v1alpha1/componentversion_types.go b/api/v1alpha1/componentversion_types.go index 798848e0..376778a0 100644 --- a/api/v1alpha1/componentversion_types.go +++ b/api/v1alpha1/componentversion_types.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/api/v1alpha1/configuration_types.go b/api/v1alpha1/configuration_types.go index 5b2c8203..d0093c7b 100644 --- a/api/v1alpha1/configuration_types.go +++ b/api/v1alpha1/configuration_types.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/api/v1alpha1/groupversion_info.go b/api/v1alpha1/groupversion_info.go index 65bf10c2..b941a244 100644 --- a/api/v1alpha1/groupversion_info.go +++ b/api/v1alpha1/groupversion_info.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 // Package v1alpha1 contains API Schema definitions for the delivery v1alpha1 API group // +kubebuilder:object:generate=true diff --git a/api/v1alpha1/localization_types.go b/api/v1alpha1/localization_types.go index 55cf1d90..18b0f23f 100644 --- a/api/v1alpha1/localization_types.go +++ b/api/v1alpha1/localization_types.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/api/v1alpha1/resource_types.go b/api/v1alpha1/resource_types.go index 297cdf42..4abf0d41 100644 --- a/api/v1alpha1/resource_types.go +++ b/api/v1alpha1/resource_types.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/api/v1alpha1/snapshot_types.go b/api/v1alpha1/snapshot_types.go index 0aab1b91..ca64e4e5 100644 --- a/api/v1alpha1/snapshot_types.go +++ b/api/v1alpha1/snapshot_types.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 0242f632..fd502aa6 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1,21 +1,10 @@ //go:build !ignore_autogenerated // +build !ignore_autogenerated -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 // Code generated by controller-gen. DO NOT EDIT. diff --git a/controllers/build_tar.go b/controllers/build_tar.go index 24a76898..23a846c2 100644 --- a/controllers/build_tar.go +++ b/controllers/build_tar.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 + package controllers import ( diff --git a/controllers/componentversion_contoller_test.go b/controllers/componentversion_contoller_test.go index 3b6550f1..af4d4fc2 100644 --- a/controllers/componentversion_contoller_test.go +++ b/controllers/componentversion_contoller_test.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 + package controllers import ( diff --git a/controllers/componentversion_controller.go b/controllers/componentversion_controller.go index 3b90c519..0dae975e 100644 --- a/controllers/componentversion_controller.go +++ b/controllers/componentversion_controller.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 package controllers diff --git a/controllers/configuration_controller.go b/controllers/configuration_controller.go index a5f5bb1d..688952f8 100644 --- a/controllers/configuration_controller.go +++ b/controllers/configuration_controller.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 package controllers diff --git a/controllers/get_component_descriptor.go b/controllers/get_component_descriptor.go index 1fa11529..a479c49e 100644 --- a/controllers/get_component_descriptor.go +++ b/controllers/get_component_descriptor.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 + package controllers import ( diff --git a/controllers/get_component_descriptor_test.go b/controllers/get_component_descriptor_test.go index 24687580..2857a58a 100644 --- a/controllers/get_component_descriptor_test.go +++ b/controllers/get_component_descriptor_test.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 + package controllers import ( diff --git a/controllers/get_resource.go b/controllers/get_resource.go index 7455fd65..cd6e1dd9 100644 --- a/controllers/get_resource.go +++ b/controllers/get_resource.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 + package controllers import ( diff --git a/controllers/get_unstructured_object.go b/controllers/get_unstructured_object.go index 6fc25db0..0a72cb15 100644 --- a/controllers/get_unstructured_object.go +++ b/controllers/get_unstructured_object.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 + package controllers import ( diff --git a/controllers/localization_controller.go b/controllers/localization_controller.go index 55f8306b..70973514 100644 --- a/controllers/localization_controller.go +++ b/controllers/localization_controller.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 package controllers diff --git a/controllers/resource_controller.go b/controllers/resource_controller.go index 84897884..2949ae87 100644 --- a/controllers/resource_controller.go +++ b/controllers/resource_controller.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 package controllers diff --git a/controllers/snapshot_controller.go b/controllers/snapshot_controller.go index 2b10614f..07497240 100644 --- a/controllers/snapshot_controller.go +++ b/controllers/snapshot_controller.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 package controllers diff --git a/controllers/suite_test.go b/controllers/suite_test.go index f0dbcd0a..2079cc73 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 package controllers diff --git a/main.go b/main.go index 1fd4d0ef..dbb7121a 100644 --- a/main.go +++ b/main.go @@ -1,18 +1,7 @@ -/* -Copyright 2022. - -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 2022. +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 package main diff --git a/pkg/configdata/configdata.go b/pkg/configdata/configdata.go index d1f28b50..c7220f92 100644 --- a/pkg/configdata/configdata.go +++ b/pkg/configdata/configdata.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 + package configdata import ( diff --git a/pkg/ocm/ocm.go b/pkg/ocm/ocm.go index fde3947d..2d9e975d 100644 --- a/pkg/ocm/ocm.go +++ b/pkg/ocm/ocm.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// +// SPDX-License-Identifier: Apache-2.0 + package ocm import ( diff --git a/pkg/registry/registry.go b/pkg/registry/registry.go index 7bbbb7af..c86d5411 100644 --- a/pkg/registry/registry.go +++ b/pkg/registry/registry.go @@ -1,4 +1,5 @@ -// Modified from https://github.com/mesosphere/mindthegap/blob/main/docker/registry/registry.go +// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. +// // SPDX-License-Identifier: Apache-2.0 package registry