diff --git a/.github/templates/NOTICE.MD.tmpl b/.github/templates/NOTICE.txt.tmpl similarity index 92% rename from .github/templates/NOTICE.MD.tmpl rename to .github/templates/NOTICE.txt.tmpl index f4903194d..b58a23740 100644 --- a/.github/templates/NOTICE.MD.tmpl +++ b/.github/templates/NOTICE.txt.tmpl @@ -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/). diff --git a/.github/templates/dependencies.asciidoc.tmpl b/.github/templates/dependencies.asciidoc.tmpl new file mode 100644 index 000000000..98cd3bdd7 --- /dev/null +++ b/.github/templates/dependencies.asciidoc.tmpl @@ -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[] +|=== diff --git a/.github/workflows/generate-notice.yml b/.github/workflows/generate-notice.yml index dad1fa0c3..ba199b337 100644 --- a/.github/workflows/generate-notice.yml +++ b/.github/workflows/generate-notice.yml @@ -21,12 +21,14 @@ 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 + ls + 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 +