Skip to content

Commit

Permalink
use short license headers
Browse files Browse the repository at this point in the history
I've been meaning to do this for a long time, and Sandro confirmed for
me that `reuse` also likes the short license headers.
  • Loading branch information
majewsky committed Dec 6, 2024
1 parent 1162738 commit 12ad822
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/makefile/makefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
},
})

Expand Down

0 comments on commit 12ad822

Please sign in to comment.