mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
feat: nfpm changelog support (#3309)
closes #3259 Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
c83663cc26
commit
3f60327964
@ -67,8 +67,6 @@ changelog:
|
||||
- title: Other work
|
||||
order: 9999
|
||||
|
||||
|
||||
|
||||
dockers:
|
||||
- image_templates:
|
||||
- 'goreleaser/goreleaser:{{ .Tag }}-amd64'
|
||||
|
@ -252,6 +252,7 @@ func create(ctx *context.Context, fpm config.NFPM, format string, binaries []*ar
|
||||
Vendor: fpm.Vendor,
|
||||
Homepage: homepage,
|
||||
License: fpm.License,
|
||||
Changelog: fpm.Changelog,
|
||||
Overridables: nfpm.Overridables{
|
||||
Conflicts: overridden.Conflicts,
|
||||
Depends: overridden.Dependencies,
|
||||
|
@ -100,6 +100,7 @@ func TestRunPipe(t *testing.T) {
|
||||
Maintainer: "me@me",
|
||||
Vendor: "asdf",
|
||||
Homepage: "https://goreleaser.com/{{ .Env.PRO }}",
|
||||
Changelog: "./testdata/changelog.yaml",
|
||||
NFPMOverridables: config.NFPMOverridables{
|
||||
FileNameTemplate: defaultNameTemplate + "-{{ .Release }}-{{ .Epoch }}",
|
||||
PackageName: "foo",
|
||||
|
23
internal/pipe/nfpm/testdata/changelog.yaml
vendored
Normal file
23
internal/pipe/nfpm/testdata/changelog.yaml
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
- semver: 0.2.2
|
||||
date: 2022-08-15T23:28:59-03:00
|
||||
packager: GitHub <noreply@github.com>
|
||||
changes:
|
||||
- commit: 4864bcced8ccc6b0428b237aa75e5c6b7e56fa69
|
||||
note: 'fix: force old version of go-git to avoid go-crypto issues'
|
||||
author:
|
||||
name: Carlos A Becker
|
||||
email: caarlos0@users.noreply.github.com
|
||||
committer:
|
||||
name: Carlos A Becker
|
||||
email: caarlos0@users.noreply.github.com
|
||||
- commit: 1893f0b7a809699baf5138569de677a0a5de0445
|
||||
note: 'fix: old go-crypto version'
|
||||
author:
|
||||
name: Carlos A Becker
|
||||
email: caarlos0@users.noreply.github.com
|
||||
committer:
|
||||
name: Carlos A Becker
|
||||
email: caarlos0@users.noreply.github.com
|
||||
- semver: 0.2.1
|
||||
date: 2022-08-15T22:44:59-03:00
|
||||
packager: GitHub <noreply@github.com>
|
@ -543,6 +543,7 @@ type NFPM struct {
|
||||
Description string `yaml:"description,omitempty" json:"description,omitempty"`
|
||||
License string `yaml:"license,omitempty" json:"license,omitempty"`
|
||||
Bindir string `yaml:"bindir,omitempty" json:"bindir,omitempty"`
|
||||
Changelog string `yaml:"changelog,omitempty" json:"changelog,omitempty"`
|
||||
Meta bool `yaml:"meta,omitempty" json:"meta,omitempty"` // make package without binaries - only deps
|
||||
}
|
||||
|
||||
|
@ -126,6 +126,16 @@ nfpms:
|
||||
# Defaults to false.
|
||||
meta: true
|
||||
|
||||
# Changelog YAML file, see: https://github.com/goreleaser/chglog
|
||||
#
|
||||
# You can use goreleaser/chglog to create the changelog for your project,
|
||||
# pass that changelog yaml file to GoReleaser,
|
||||
# and it should in turn setup it accordingly for the given available
|
||||
# formats (deb and rpm at the moment).
|
||||
#
|
||||
# Experimental.
|
||||
changelog: ./foo.yml
|
||||
|
||||
# Contents to add to the package.
|
||||
# GoReleaser will automatically add the binaries.
|
||||
contents:
|
||||
|
Loading…
x
Reference in New Issue
Block a user