From 12ad8229efeffa99f04e52861b0dd1d237e3ea66 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Fri, 6 Dec 2024 14:20:43 +0100 Subject: [PATCH] use short license headers I've been meaning to do this for a long time, and Sandro confirmed for me that `reuse` also likes the short license headers. --- Makefile | 2 +- internal/makefile/makefile.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1f205d6..23c4e75 100644 --- a/Makefile +++ b/Makefile @@ -109,7 +109,7 @@ 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" diff --git a/internal/makefile/makefile.go b/internal/makefile/makefile.go index d9ee5aa..fd32825 100644 --- a/internal/makefile/makefile.go +++ b/internal/makefile/makefile.go @@ -416,7 +416,7 @@ endif prerequisites: []string{"install-addlicense"}, recipe: []string{ `@printf "\e[1;36m>> addlicense\e[0m\n"`, - fmt.Sprintf(`echo -n %s | 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" %s {}'`, allSourceFilesExpr, ignoreOptionsStr), + fmt.Sprintf(`echo -n %s | 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" %s {}'`, allSourceFilesExpr, ignoreOptionsStr), }, })