Skip to content

Commit

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

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Aug 18, 2024
1 parent 52e0c63 commit d40a1c1
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 <pkg@carlosbecker.com>
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 <pkg@carlosbecker.com>
Installed-Size: 10
Replaces: svn
Expand Down

0 comments on commit d40a1c1

Please sign in to comment.