mirror of
https://github.com/goreleaser/goreleaser.git
synced 2024-12-31 01:53:50 +02:00
feat: support replaces on nfpm (#1888)
* feat: support replaces on nfpm Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * Update www/docs/customization/nfpm.md
This commit is contained in:
parent
17e56747cc
commit
9935b87100
@ -165,6 +165,7 @@ func create(ctx *context.Context, fpm config.NFPM, format, arch string, binaries
|
||||
Depends: overridden.Dependencies,
|
||||
Recommends: overridden.Recommends,
|
||||
Suggests: overridden.Suggests,
|
||||
Replaces: overridden.Replaces,
|
||||
EmptyFolders: overridden.EmptyFolders,
|
||||
Files: files,
|
||||
ConfigFiles: overridden.ConfigFiles,
|
||||
|
@ -101,6 +101,7 @@ func TestRunPipe(t *testing.T) {
|
||||
Dependencies: []string{"make"},
|
||||
Recommends: []string{"svn"},
|
||||
Suggests: []string{"bzr"},
|
||||
Replaces: []string{"fish"},
|
||||
Conflicts: []string{"git"},
|
||||
EmptyFolders: []string{"/var/log/foobar"},
|
||||
Release: "10",
|
||||
@ -607,6 +608,7 @@ func TestMeta(t *testing.T) {
|
||||
Dependencies: []string{"make"},
|
||||
Recommends: []string{"svn"},
|
||||
Suggests: []string{"bzr"},
|
||||
Replaces: []string{"fish"},
|
||||
Conflicts: []string{"git"},
|
||||
EmptyFolders: []string{"/var/log/foobar"},
|
||||
Release: "10",
|
||||
|
@ -399,6 +399,7 @@ type NFPMOverridables struct {
|
||||
Recommends []string `yaml:",omitempty"`
|
||||
Suggests []string `yaml:",omitempty"`
|
||||
Conflicts []string `yaml:",omitempty"`
|
||||
Replaces []string `yaml:",omitempty"`
|
||||
EmptyFolders []string `yaml:"empty_folders,omitempty"`
|
||||
Files map[string]string `yaml:",omitempty"`
|
||||
ConfigFiles map[string]string `yaml:"config_files,omitempty"`
|
||||
|
@ -85,6 +85,10 @@ nfpms:
|
||||
- svn
|
||||
- bash
|
||||
|
||||
# Packages it replaces.
|
||||
replaces:
|
||||
- fish
|
||||
|
||||
# Override default /usr/local/bin destination for binaries
|
||||
bindir: /usr/bin
|
||||
|
||||
@ -133,7 +137,7 @@ nfpms:
|
||||
preremove: "scripts/preremove.sh"
|
||||
postremove: "scripts/postremove.sh"
|
||||
|
||||
# Some attributes can be overrided per package format.
|
||||
# Some attributes can be overridden per package format.
|
||||
overrides:
|
||||
deb:
|
||||
conflicts:
|
||||
@ -144,6 +148,8 @@ nfpms:
|
||||
- gitk
|
||||
recommends:
|
||||
- tig
|
||||
replaces:
|
||||
- bash
|
||||
empty_folders:
|
||||
- /var/log/bar
|
||||
rpm:
|
||||
|
Loading…
Reference in New Issue
Block a user