You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/maintainer/adding_pkgs.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -994,6 +994,42 @@ about:
994
994
- package_license.txt
995
995
```
996
996
997
+
<a id="Go"></a>
998
+
999
+
##### Go
1000
+
1001
+
[go-licenses](https://github.com/google/go-licenses) can be included in the build process of a package and will automatically collect and add the license files of all dependencies of a package.
1002
+
1003
+
For a detailed description, please visit the project page but a short example can be found below.
1004
+
1005
+
First, include the collection of licenses as a step of the build process.
1006
+
1007
+
```yaml
1008
+
build:
1009
+
number: 0
1010
+
script:
1011
+
- go build [...]
1012
+
- go-licenses save . --save_path="./license-files/"
1013
+
```
1014
+
1015
+
Then, include the tool as a build time dependency.
1016
+
1017
+
```yaml
1018
+
requirements:
1019
+
build:
1020
+
- {{ compiler('go') }}
1021
+
- go-licenses
1022
+
```
1023
+
1024
+
Finally, make sure that the generated file is included in the recipe.
1025
+
1026
+
```yaml
1027
+
about:
1028
+
license_file:
1029
+
- LICENSE
1030
+
- license-files/
1031
+
```
1032
+
997
1033
:::warning[Important]
998
1034
999
1035
We are not lawyers and cannot guarantee that the above advice is correct or that the tools are able to find all license files.
0 commit comments