Go licenses as markdown template
This commit is contained in:
parent
d37958fc37
commit
614f15e1f1
12 changed files with 1064 additions and 1587 deletions
8
licenses/fetch_licenses.sh
Executable file
8
licenses/fetch_licenses.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
TPL_LOCATION="$SCRIPT_DIR/template.md"
|
||||
STATIC_LOCATION="$SCRIPT_DIR/../static/licenses.md"
|
||||
PROJECT_URL="git.readonly.ch/bouzoure/pop-camarades"
|
||||
|
||||
go-licenses report "$PROJECT_URL" --template "$TPL_LOCATION" > "$STATIC_LOCATION"
|
||||
3
licenses/install_tool.sh
Executable file
3
licenses/install_tool.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
go install github.com/google/go-licenses@latest
|
||||
15
licenses/template.md
Normal file
15
licenses/template.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{{ range . }}
|
||||
## {{ .Name }}
|
||||
|
||||
* Name: {{ .Name }}
|
||||
* Version: {{ .Version }}
|
||||
{{ if ne .LicenseURL "Unknown" }}
|
||||
* License: [{{ .LicenseName }}]({{ .LicenseURL }})
|
||||
{{ else }}
|
||||
* License: {{ .LicenseName }}
|
||||
{{ end }}
|
||||
|
||||
```
|
||||
{{ .LicenseText }}
|
||||
```
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue