1
0
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:
Carlos Alexandro Becker 2022-08-16 02:05:46 -03:00 committed by GitHub
parent c83663cc26
commit 3f60327964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 2 deletions

View File

@ -67,8 +67,6 @@ changelog:
- title: Other work
order: 9999
dockers:
- image_templates:
- 'goreleaser/goreleaser:{{ .Tag }}-amd64'

View File

@ -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,

View File

@ -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",

View 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>

View File

@ -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
}

View File

@ -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: