Skip to content

Commit

Permalink
feat(deb): set license field
Browse files Browse the repository at this point in the history
closes #847

Signed-off-by: Carlos Alexandro Becker <[email protected]>
  • Loading branch information
caarlos0 committed Aug 18, 2024
1 parent 52e0c63 commit ceb541f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deb/deb.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,9 @@ Section: {{.Info.Section}}
Priority: {{.Info.Priority}}
Architecture: {{ if ne .Info.Platform "linux"}}{{ .Info.Platform }}-{{ end }}{{.Info.Arch}}
{{- /* Optional fields */ -}}
{{- if .Info.License }}
License: {{.Info.License}}
{{- end }}
{{- if .Info.Maintainer}}
Maintainer: {{.Info.Maintainer}}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions deb/deb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func exampleInfo() *nfpm.Info {
Section: "default",
Homepage: "http://carlosbecker.com",
Vendor: "nope",
License: "MIT",
Overridables: nfpm.Overridables{
Depends: []string{
"bash",
Expand Down
1 change: 1 addition & 0 deletions deb/testdata/bad_provides.golden
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Version: 1.0.0
Section: default
Priority: extra
Architecture: amd64
License: MIT
Maintainer: Carlos A Becker <[email protected]>
Installed-Size: 0
Replaces: svn
Expand Down
1 change: 1 addition & 0 deletions deb/testdata/control.golden
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Version: 1.0.0
Section: default
Priority: extra
Architecture: amd64
License: MIT
Maintainer: Carlos A Becker <[email protected]>
Installed-Size: 10
Replaces: svn
Expand Down

0 comments on commit ceb541f

Please sign in to comment.