Skip to content

Commit

Permalink
install license detector
Browse files Browse the repository at this point in the history
  • Loading branch information
pivovarit committed Jul 5, 2024
1 parent a11732c commit 34ba9c2
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Licence : {{ $dep.LicenceType }}
{{ end }}
{{- end -}}

Copyright 2022-{{ currentYear }} Quesma
Copyright 2019-{{ currentYear }} Quesma Inc

This product includes software developed by The Apache Software
Foundation (http://www.apache.org/).
Expand Down
51 changes: 51 additions & 0 deletions .github/templates/dependencies.asciidoc.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{{- define "depRow" -}}
{{- range $i, $dep := . }}
| link:{{ $dep.URL }}[$${{ $dep.Name }}$$] | {{ $dep.Version }} | {{ $dep.LicenceType }}
{{- end }}
{{- end -}}
// Generated documentation. Please do not edit.
:page_id: dependencies
ifdef::env-github[]
****
link:https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-{page_id}.html[View this document on the Elastic website]
****
endif::[]

[id="{p}-{page_id}"]
= Third-party dependencies

This page lists the third-party dependencies used to build {n}.

[float]
[id="{p}-dependencies-direct"]
== Direct dependencies

[options="header"]
|===
| Name | Version | Licence
{{ template "depRow" .Direct }}
|===

{{ if .Indirect }}
[float]
[id="{p}-dependencies-indirect"]
== Indirect dependencies

[options="header"]
|===
| Name | Version | Licence
{{ template "depRow" .Indirect }}
|===
{{ end }}

[float]
[id="{p}-dependencies-image"]
== Container image dependencies

Dependencies included in the {n} container image.

[options="header",format="csv"]
|===
Name, Version, Licence, URL
include::container-image-dependencies.csv[]
|===
7 changes: 4 additions & 3 deletions .github/workflows/generate-notice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ jobs:

- name: Install go-licence-detector
working-directory: ${{ matrix.module }}
run: go get go.elastic.co/go-licence-detector
run: go install go.elastic.co/go-licence-detector


- name: Print Dependencies
working-directory: ${{ matrix.module }}
run: |
go list -m -json all | go-licence-detector -includeIndirect -depsOut=dependencies.asciidoc -noticeOut=NOTICE.txt
cat NOTICE.txt
go list -m -json all | go-licence-detector -includeIndirect -noticeTemplate="../templates/NOTICE.txt.tmpl -noticeOut=NOTICE.txt -depsTemplate="../templates/dependencies.asciidoc.tmpl -depsOut=dependencies.asciidoc
cat dependencies.asciidoc
cat NOTICE.txt

0 comments on commit 34ba9c2

Please sign in to comment.