Skip to content
Permalink
Browse files

feat: nfpm: support creating empty folders

  • Loading branch information...
caarlos0 committed May 17, 2018
1 parent 5252f74 commit e1650580982a5082673cc2aad31e0a604d496ecb
Showing with 13 additions and 10 deletions.
  1. +3 −3 Gopkg.lock
  2. +1 −1 Gopkg.toml
  3. +1 −0 config/config.go
  4. +7 −6 pipeline/nfpm/nfpm.go
  5. +1 −0 pipeline/nfpm/nfpm_test.go

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -48,7 +48,7 @@

[[constraint]]
name = "github.com/goreleaser/nfpm"
version = "~0.8.0"
version = "~0.9.0"

[[constraint]]
name = "github.com/alecthomas/kingpin"
@@ -189,6 +189,7 @@ type NFPMOverridables struct {
Recommends []string `yaml:",omitempty"`
Suggests []string `yaml:",omitempty"`
Conflicts []string `yaml:",omitempty"`
EmptyFolders []string `yaml:"empty_folders,omitempty"`
Files map[string]string `yaml:",omitempty"`
ConfigFiles map[string]string `yaml:"config_files,omitempty"`
Scripts NFPMScripts `yaml:"scripts,omitempty"`
@@ -135,12 +135,13 @@ func create(ctx *context.Context, format, arch string, binaries []artifact.Artif
License: ctx.Config.NFPM.License,
Bindir: ctx.Config.NFPM.Bindir,
Overridables: nfpm.Overridables{
Conflicts: overrided.Conflicts,
Depends: overrided.Dependencies,
Recommends: overrided.Recommends,
Suggests: overrided.Suggests,
Files: files,
ConfigFiles: overrided.ConfigFiles,
Conflicts: overrided.Conflicts,
Depends: overrided.Dependencies,
Recommends: overrided.Recommends,
Suggests: overrided.Suggests,
EmptyFolders: overrided.EmptyFolders,
Files: files,
ConfigFiles: overrided.ConfigFiles,
Scripts: nfpm.Scripts{
PreInstall: overrided.Scripts.PreInstall,
PostInstall: overrided.Scripts.PostInstall,
@@ -84,6 +84,7 @@ func TestRunPipe(t *testing.T) {
Recommends: []string{"svn"},
Suggests: []string{"bzr"},
Conflicts: []string{"git"},
EmptyFolders: []string{"/var/log/foobar"},
Files: map[string]string{
"./testdata/testfile.txt": "/usr/share/testfile.txt",
},

0 comments on commit e165058

Please sign in to comment.
You can’t perform that action at this time.