From ce14a9e6847b878ee3177c1c6003a6ed7d28f556 Mon Sep 17 00:00:00 2001 From: Grzegorz Piwowarek Date: Fri, 5 Jul 2024 11:46:08 +0200 Subject: [PATCH] install license detector --- .github/templates/NOTICE.MD.tmpl | 29 +++++++++++++++++++++++++++ .github/workflows/generate-notice.yml | 5 +++++ 2 files changed, 34 insertions(+) create mode 100644 .github/templates/NOTICE.MD.tmpl diff --git a/.github/templates/NOTICE.MD.tmpl b/.github/templates/NOTICE.MD.tmpl new file mode 100644 index 000000000..f4903194d --- /dev/null +++ b/.github/templates/NOTICE.MD.tmpl @@ -0,0 +1,29 @@ +{{- define "depInfo" -}} +{{- range $i, $dep := . }} +{{ "-" | line }} +Module : {{ $dep.Name }} +Version : {{ $dep.Version }} +Time : {{ $dep.VersionTime }} +Licence : {{ $dep.LicenceType }} + +{{ $dep | licenceText }} +{{ end }} +{{- end -}} + +Copyright 2022-{{ currentYear }} Quesma + +This product includes software developed by The Apache Software +Foundation (http://www.apache.org/). + +{{ "=" | line }} +Third party libraries used by the quesma project +{{ "=" | line }} + +{{ template "depInfo" .Direct }} + +{{ if .Indirect }} +{{ "=" | line }} +Indirect dependencies + +{{ template "depInfo" .Indirect }} +{{ end }} diff --git a/.github/workflows/generate-notice.yml b/.github/workflows/generate-notice.yml index ae177436e..872441930 100644 --- a/.github/workflows/generate-notice.yml +++ b/.github/workflows/generate-notice.yml @@ -19,6 +19,11 @@ jobs: cache-dependency-path: ${{ matrix.module }}/go.sum go-version: '1.22' + - name: Install go-licence-detector + working-directory: ${{ matrix.module }} + run: go get go.elastic.co/go-licence-detector + + - name: Print Dependencies working-directory: ${{ matrix.module }} run: |