Skip to content

Commit bcd8dcb

Browse files
rockwotjRafalKorepta
authored andcommitted
licenses: update third party licenses to be correct
And auto generated using the go-licenses tool
1 parent 51f8bb2 commit bcd8dcb

File tree

4 files changed

+473
-284
lines changed

4 files changed

+473
-284
lines changed

Taskfile.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ vars:
88
sh: 'realpath {{default "." .SRC_DIR}}'
99
BUILD_ROOT:
1010
sh: 'realpath {{default ".build" .BUILD_ROOT}}'
11+
_PKG:
12+
sh: go work edit -json | jq -j '[.Use[].DiskPath+"/..."]|join(" ")'
13+
PKG: '{{default ._PKG .PKG}}'
1114

1215
includes:
1316
ci: taskfiles/ci.yml
@@ -18,10 +21,6 @@ includes:
1821

1922
tasks:
2023
lint:
21-
vars:
22-
_PKG:
23-
sh: go work edit -json | jq -j '[.Use[].DiskPath+"/..."]|join(" ")'
24-
PKG: '{{default ._PKG .PKG}}'
2524
cmds:
2625
- golangci-lint run --timeout 28m {{.PKG}} {{.CLI_ARGS}}
2726
- ct lint --chart-dirs ./charts --check-version-increment=false --all
@@ -54,9 +53,29 @@ tasks:
5453
- task: dev:update-licenses
5554
- task: k8s:generate
5655
- task: dev:update-licenses
56+
- task: generate:third-party-licenses-list
5757
- task: generate:changelog
5858
- nix fmt # Ensure flake.nix has been formatted.
5959

60+
generate:third-party-licenses-list:
61+
generates:
62+
- licenses/third_party.md
63+
sources:
64+
- ./**/go.mod
65+
- ./**/go.sum
66+
cmds:
67+
# Our own packages should not be reported as third party license
68+
# The example.com/example depedency is ignored as it's part of the
69+
# gotohelm test suite (visit ./pkg/gotohelm/testdata/src/example/go.mod)
70+
- |
71+
go-licenses report {{.PKG}} --template licenses/third_party.md.tpl \
72+
--ignore buf.build/gen/go/redpandadata \
73+
--ignore example.com/example \
74+
--ignore github.com/redpanda-data/common-go \
75+
--ignore github.com/redpanda-data/console/backend \
76+
--ignore github.com/redpanda-data/redpanda \
77+
--ignore github.com/redpanda-data/redpanda-operator > licenses/third_party.md
78+
6079
generate:changelog:
6180
generates:
6281
- charts/*/CHANGELOG.md
@@ -83,9 +102,6 @@ tasks:
83102

84103
test:unit:
85104
vars:
86-
_PKG:
87-
sh: go work edit -json | jq -j '[.Use[].DiskPath+"/..."]|join(" ")'
88-
PKG: '{{default ._PKG .PKG}}'
89105
GO_TEST_RUNNER: '{{default "go test" .GO_TEST_RUNNER}}'
90106
cmds:
91107
- '{{.GO_TEST_RUNNER}} {{.CLI_ARGS}} {{.PKG}}'

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
pkgs.docker-tag-list
5454
pkgs.gawk # GNU awk, used by some build scripts.
5555
pkgs.gnused # Stream Editor, used by some build scripts.
56+
pkgs.go-licenses
5657
pkgs.go-task
5758
pkgs.go-tools
5859
pkgs.go_1_23

0 commit comments

Comments
 (0)