diff --git a/Makefile b/Makefile index bbdd3748d1e6142e9f8f249848b85cd7668f3e72..423c46b20c6bf1a7582e5b2ed663f61433b09458 100644 --- a/Makefile +++ b/Makefile @@ -141,5 +141,17 @@ 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 5501b77d56929219ff54ed6f7041ec83159609ff..b219b551c4f79386607492b2bb7cd67686801cc0 100644 --- a/api.go +++ b/api.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/api_test.go b/api_test.go index eb85229e7337850f9e6f05190669e2c18b7e20aa..84741375c68f6bff8583dad505c1b36eaa86231d 100644 --- a/api_test.go +++ b/api_test.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/command.go b/command.go index e7dc0ecdae00f92413fc0b7c00dcefb6ee3ee908..a523d1574be03c3553d8f7095f97fb4d2c4a4092 100644 --- a/command.go +++ b/command.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/command_test.go b/command_test.go index 79a34f254f0d9363364bd56e0b480f6456db1073..9afdf831937353b65e8030cc1c32e3a9289c08fe 100644 --- a/command_test.go +++ b/command_test.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/doc.go b/doc.go index cc88bfa852292bf41d7d0a353272cedae8f1795e..69bd673b1ec3e95fa7f2b604e0026e6e7cd2e9d5 100644 --- a/doc.go +++ b/doc.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later // This package provides a simple way to create a CLI application // with subcommands. It is based on the flags package from diff --git a/error.go b/error.go index b8c4678cc7067b0c74085ce124b5f3fb450c375d..9aa6a32ce8958c5c0501d82b693f5277012299c4 100644 --- a/error.go +++ b/error.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/error_test.go b/error_test.go index a283dc16b13ed03c45059c2ba9170fdc8d1bfcb0..e05a12a7e5a828171c60add930aa8fb8b201ea12 100644 --- a/error_test.go +++ b/error_test.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/execute.go b/execute.go index 56ee244a2e0a57d0c88423a81176af11d73824ca..5acb3aee89d0d76a926b7a63435975bd1344051d 100644 --- a/execute.go +++ b/execute.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/execute_test.go b/execute_test.go index 6444edea57cf64de9871cb76f968e6c59eab9c65..5d2f670bfb72a9f102c7bb93dc26bf0e27743ed8 100644 --- a/execute_test.go +++ b/execute_test.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/flag.go b/flag.go index 122fbbad3984f1336a519546015ada2cd8e2d279..79970a31cd84d33710fc94d8c364e1b59f7a052e 100644 --- a/flag.go +++ b/flag.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/flag_test.go b/flag_test.go index df67af092b4666e3c7fefa6fe2193243f7872f0d..802d06fbe793b2a2435d9e04ce5e270a1e7f991b 100644 --- a/flag_test.go +++ b/flag_test.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/integration_test.go b/integration_test.go index a8e778f51dc5f56cab5180dc7169f879521f035c..5107d7ab2a3d3b26568a77c6457dae948d8d649e 100644 --- a/integration_test.go +++ b/integration_test.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/parse.go b/parse.go index c2eb85fb047481ce74f284119b18396d1684226e..5df9a73589da66f6fae4d81ee48e99b34ad09663 100644 --- a/parse.go +++ b/parse.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/pathfind.go b/pathfind.go index 0ee103838105e374ca0874baf263b2e7a47f0d62..29c1644292c094ea5658208952f2d33f291ba9f5 100644 --- a/pathfind.go +++ b/pathfind.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/pathfind_test.go b/pathfind_test.go index 696409e860c6b7f2fb1be37445e5d062f20c2b4a..447151279a966abd224e6820a63e6603535b3686 100644 --- a/pathfind_test.go +++ b/pathfind_test.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/readme_test.go b/readme_test.go index 5bbb4622e8fb197c45b09b16e70db675da1d6790..cb3a04e498e301e8b4f4be57f36fd9376a298416 100644 --- a/readme_test.go +++ b/readme_test.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/setting.go b/setting.go index 2a4dd723ea3b08ffb0049f075c98616f5a32184e..9b3d3e6850dfb339fb76b78105257c29f9558250 100644 --- a/setting.go +++ b/setting.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/setting_test.go b/setting_test.go index 23a08b8cae0873905a792644c1e0b47afc74de9d..b202cffe0012f82afc5cc6454809edbdbea5e5cd 100644 --- a/setting_test.go +++ b/setting_test.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/shadow.go b/shadow.go index 7570d31905ce9f7a66a06de77fdd71a7b0f4f2ac..e11e572da4730c27f7790d5002e8c197e154a692 100644 --- a/shadow.go +++ b/shadow.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/shadow_test.go b/shadow_test.go index cc8b19ed85fdb0720dea1b7bcc8e1d57f6f5bc39..177ea48886464082d4109ced3fb9b7d6501a0056 100644 --- a/shadow_test.go +++ b/shadow_test.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/tags.go b/tags.go index 11ca988029adef3b3ed0774687f793a6f65b0e02..790f634a0ba87e6443088e9b1851f03c59402834 100644 --- a/tags.go +++ b/tags.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags diff --git a/tags_test.go b/tags_test.go index 943d05396dc9326d567f776cf5df10e6ded10629..319b8b7f4cb8d0aa356e45c9c51dd978f0b718b6 100644 --- a/tags_test.go +++ b/tags_test.go @@ -1,6 +1,5 @@ -// 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. +// Copyright 2022 schukai GmbH +// SPDX-License-Identifier: AGPL-3.0-or-later package xflags