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
1215includes :
1316 ci : taskfiles/ci.yml
@@ -18,10 +21,6 @@ includes:
1821
1922tasks :
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}}'
0 commit comments