Skip to content

Commit

Permalink
licenses: update third party licenses to be correct
Browse files Browse the repository at this point in the history
And auto generated using the go-licenses tool
  • Loading branch information
rockwotj authored and RafalKorepta committed Jan 16, 2025
1 parent 51f8bb2 commit bcd8dcb
Show file tree
Hide file tree
Showing 4 changed files with 473 additions and 284 deletions.
30 changes: 23 additions & 7 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ vars:
sh: 'realpath {{default "." .SRC_DIR}}'
BUILD_ROOT:
sh: 'realpath {{default ".build" .BUILD_ROOT}}'
_PKG:
sh: go work edit -json | jq -j '[.Use[].DiskPath+"/..."]|join(" ")'
PKG: '{{default ._PKG .PKG}}'

includes:
ci: taskfiles/ci.yml
Expand All @@ -18,10 +21,6 @@ includes:

tasks:
lint:
vars:
_PKG:
sh: go work edit -json | jq -j '[.Use[].DiskPath+"/..."]|join(" ")'
PKG: '{{default ._PKG .PKG}}'
cmds:
- golangci-lint run --timeout 28m {{.PKG}} {{.CLI_ARGS}}
- ct lint --chart-dirs ./charts --check-version-increment=false --all
Expand Down Expand Up @@ -54,9 +53,29 @@ tasks:
- task: dev:update-licenses
- task: k8s:generate
- task: dev:update-licenses
- task: generate:third-party-licenses-list
- task: generate:changelog
- nix fmt # Ensure flake.nix has been formatted.

generate:third-party-licenses-list:
generates:
- licenses/third_party.md
sources:
- ./**/go.mod
- ./**/go.sum
cmds:
# Our own packages should not be reported as third party license
# The example.com/example depedency is ignored as it's part of the
# gotohelm test suite (visit ./pkg/gotohelm/testdata/src/example/go.mod)
- |
go-licenses report {{.PKG}} --template licenses/third_party.md.tpl \
--ignore buf.build/gen/go/redpandadata \
--ignore example.com/example \
--ignore github.com/redpanda-data/common-go \
--ignore github.com/redpanda-data/console/backend \
--ignore github.com/redpanda-data/redpanda \
--ignore github.com/redpanda-data/redpanda-operator > licenses/third_party.md
generate:changelog:
generates:
- charts/*/CHANGELOG.md
Expand All @@ -83,9 +102,6 @@ tasks:

test:unit:
vars:
_PKG:
sh: go work edit -json | jq -j '[.Use[].DiskPath+"/..."]|join(" ")'
PKG: '{{default ._PKG .PKG}}'
GO_TEST_RUNNER: '{{default "go test" .GO_TEST_RUNNER}}'
cmds:
- '{{.GO_TEST_RUNNER}} {{.CLI_ARGS}} {{.PKG}}'
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
pkgs.docker-tag-list
pkgs.gawk # GNU awk, used by some build scripts.
pkgs.gnused # Stream Editor, used by some build scripts.
pkgs.go-licenses
pkgs.go-task
pkgs.go-tools
pkgs.go_1_23
Expand Down
Loading

0 comments on commit bcd8dcb

Please sign in to comment.