cmd/mkpkg: add changelog support for deb and rpm packages

Add a --changelog flag that accepts a path to a changelog.yaml file
in the format expected by goreleaser/chglog. When provided, the
changelog is automatically included in the package: deb packages
include it as /usr/share/doc/<package>/changelog.Debian.gz, and
rpm packages include it as changelog metadata in the package header.

The changelog flag is optional and only applies when a valid YAML
file path is provided.

Updates #314

Signed-off-by: Brendan Creane <bcreane@gmail.com>
pull/17956/head
Brendan Creane 2 weeks ago
parent 41662f5128
commit 765da20750

@ -63,6 +63,7 @@ func main() {
replaces := flag.String("replaces", "", "package which this package replaces, if any")
depends := flag.String("depends", "", "comma-separated list of packages this package depends on")
recommends := flag.String("recommends", "", "comma-separated list of packages this package recommends")
changelog := flag.String("changelog", "", "path to changelog.yaml file")
flag.Parse()
filesList, err := parseFiles(*regularFiles, files.TypeFile)
@ -88,6 +89,7 @@ func main() {
Description: *description,
Homepage: "https://www.tailscale.com",
License: "MIT",
Changelog: *changelog,
Overridables: nfpm.Overridables{
Contents: contents,
Scripts: nfpm.Scripts{

Loading…
Cancel
Save