diff --git a/.envrc b/.envrc index 8b422780..c8a98ce1 100644 --- a/.envrc +++ b/.envrc @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-FileCopyrightText: 2019–2020 Target, Copyright 2021 The Nix Community +# SPDX-License-Identifier: Apache-2.0 if type -P lorri &>/dev/null; then eval "$(lorri direnv)" else diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 1f16626a..69a36781 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -4,19 +4,6 @@ ################################################################################ # Copyright 2024 SAP SE -# -# 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. -# # SPDX-License-Identifier: Apache-2.0 name: Checks diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 28a8a01f..e32a1ef7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,19 +4,6 @@ ################################################################################ # Copyright 2024 SAP SE -# -# 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. -# # SPDX-License-Identifier: Apache-2.0 name: CI diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index 82a01411..b18fe833 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -4,19 +4,6 @@ ################################################################################ # Copyright 2024 SAP SE -# -# 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. -# # SPDX-License-Identifier: Apache-2.0 name: CodeQL diff --git a/.golangci.yaml b/.golangci.yaml index 34c3175e..9570d6ac 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -4,19 +4,6 @@ ################################################################################ # Copyright 2024 SAP SE -# -# 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. -# # SPDX-License-Identifier: Apache-2.0 run: diff --git a/Makefile b/Makefile index a1868410..4c523a06 100644 --- a/Makefile +++ b/Makefile @@ -4,19 +4,6 @@ ################################################################################ # Copyright 2024 SAP SE -# -# 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. -# # SPDX-License-Identifier: Apache-2.0 MAKEFLAGS=--warn-undefined-variables @@ -115,11 +102,11 @@ vendor-compat: FORCE force-license-headers: FORCE install-addlicense @printf "\e[1;36m>> addlicense\e[0m\n" - echo -n $(patsubst $(shell awk '$$1 == "module" {print $$2}' go.mod)%,.%/*.go,$(shell go list ./...)) | xargs -d" " -I{} bash -c 'year="$$(rg -P "Copyright (....) SAP SE" -Nor "\$$1" {})"; awk -i inplace '"'"'{if (display) {print} else {!/^\/\*/ && !/^\*/ && !/^\$$/}}; /^package /{print;display=1}'"'"' {}; addlicense -c "SAP SE" -s -y "$$year" -- {}' + echo -n $(patsubst $(shell awk '$$1 == "module" {print $$2}' go.mod)%,.%/*.go,$(shell go list ./...)) | xargs -d" " -I{} bash -c 'year="$$(rg -P "Copyright (....) SAP SE" -Nor "\$$1" {})"; awk -i inplace '"'"'{if (display) {print} else {!/^\/\*/ && !/^\*/ && !/^\$$/}}; /^package /{print;display=1}'"'"' {}; addlicense -c "SAP SE" -s=only -y "$$year" -- {}' license-headers: FORCE install-addlicense @printf "\e[1;36m>> addlicense\e[0m\n" - @addlicense -c "SAP SE" -s -- $(patsubst $(shell awk '$$1 == "module" {print $$2}' go.mod)%,.%/*.go,$(shell go list ./...)) + @addlicense -c "SAP SE" -s=only -- $(patsubst $(shell awk '$$1 == "module" {print $$2}' go.mod)%,.%/*.go,$(shell go list ./...)) check-license-headers: FORCE install-addlicense @printf "\e[1;36m>> addlicense --check\e[0m\n" diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 000000000..552d4405 --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,18 @@ +# SPDX-FileCopyrightText: SAP SE +# SPDX-License-Identifier: Apache-2.0 + +version = 1 + +[[annotations]] +path = [ + ".github/CODEOWNERS", + ".github/renovate.json", + ".gitignore", + ".license-scan-overrides.jsonl", + ".license-scan-rules.json", + "go.mod", + "go.sum", + "Makefile.maker.yaml", +] +SPDX-FileCopyrightText = "SAP SE" +SPDX-License-Identifier = "Apache-2.0" diff --git a/shell.nix b/shell.nix index fe2fa8cf..a8bbaefa 100644 --- a/shell.nix +++ b/shell.nix @@ -1,3 +1,4 @@ +# Copyright 2024 SAP SE # SPDX-License-Identifier: Apache-2.0 { pkgs ? import { } }: