diff --git a/Makefile b/Makefile index e4f9d619b9f97deb2be2e1448d584e96e6114ca4..61f670de557dba86523332b5e060512048756e21 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +## Copyright 2022 schukai GmbH. All rights reserved. +## Use of this source code is governed by a AGPL-3.0 +## license that can be found in the LICENSE file. + PROJECT_ROOT:=$(dir $(realpath $(lastword $(MAKEFILE_LIST)))) THIS_MAKEFILE:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) THIS_MAKEFILE_PATH:=$(PROJECT_ROOT)$(THIS_MAKEFILE) @@ -137,5 +141,16 @@ endif fetch-licenses: go-licenses save $(GO_CURRENT_MODULE) --ignore gitlab.schukai.com --force --save_path $(PROJECT_ROOT)licenses/ ; cd - +# https://spdx.github.io/spdx-spec/v2.3/SPDX-license-list/ +ADDLICENSE_BIN ?= addlicense +ifeq ($(shell command -v $(ADDLICENSE_BIN) 2> /dev/null),) + $(shell go install github.com/google/addlicense@latest) + EXECUTABLES = $(EXECUTABLES:-) $(ADDLICENSE_BIN); +endif + +.PHONY: add-licenses +## Add license headers to all go files +add-licenses: + addlicense -c "schukai GmbH" -s -l "AGPL-3.0-or-later" ./*.go diff --git a/api.go b/api.go index fa394b2279e0a31c8c4ae42102179edd55ee65e0..75c82ebaf3ed40aad529cc9d42e81c5d84df08d7 100644 --- a/api.go +++ b/api.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package negotiation import ( diff --git a/api_test.go b/api_test.go index c59933eb39c37faeb9926f7620c3b5e68cfed8c6..107d56310b9adf0bc12535c40bcb7b06ad684e4f 100644 --- a/api_test.go +++ b/api_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package negotiation import ( diff --git a/header.go b/header.go index 69bb5b07ce92f388e3c0869aaa841a59d419ab89..bd624d397dc32f3936f1cb15f723ab81d162aad4 100644 --- a/header.go +++ b/header.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package negotiation const ( diff --git a/parser.go b/parser.go index 9c528714751ef94ee2b31475722808d473457a58..752004d020541a79902034c6456f3afd2590d336 100644 --- a/parser.go +++ b/parser.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package negotiation import ( diff --git a/parser_test.go b/parser_test.go index 5725b3728c8adba11c03a779ee017f9a74c34bc8..82a2743dd63b4b4e89875a8b1614f2283f415af0 100644 --- a/parser_test.go +++ b/parser_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package negotiation import ( diff --git a/spec.go b/spec.go index c4633ec65bf1ee388c41e7a6a2f5021a76b78b09..7d554d2a8a988e5f4b82afb5def548190f1da1e8 100644 --- a/spec.go +++ b/spec.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package negotiation import "strings" diff --git a/spec_test.go b/spec_test.go index d66e6284aca4353d02e02c25ebaec9e7eb2251b3..93d412a95a3493f92021391a1c289f2e96dade6c 100644 --- a/spec_test.go +++ b/spec_test.go @@ -1,3 +1,6 @@ +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later + package negotiation import (