Skip to content

Commit

Permalink
feat: remove empty_folders for good (#3163)
Browse files Browse the repository at this point in the history
* feat: remove empty_folders for good

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: build

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Jun 14, 2022
1 parent f90814a commit 2c59b8e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
16 changes: 6 additions & 10 deletions internal/pipe/nfpm/nfpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ func (Pipe) Default(ctx *context.Context) error {
if fpm.FileNameTemplate == "" {
fpm.FileNameTemplate = defaultNameTemplate
}
if len(fpm.EmptyFolders) > 0 {
deprecate.Notice(ctx, "nfpms.empty_folders")
}
if fpm.Maintainer == "" {
deprecate.NoticeCustom(ctx, "nfpms.maintainer", "`{{ .Property }}` should always be set, check {{ .URL }} for more info")
}
Expand Down Expand Up @@ -256,13 +253,12 @@ func create(ctx *context.Context, fpm config.NFPM, format string, binaries []*ar
Homepage: homepage,
License: fpm.License,
Overridables: nfpm.Overridables{
Conflicts: overridden.Conflicts,
Depends: overridden.Dependencies,
Recommends: overridden.Recommends,
Suggests: overridden.Suggests,
Replaces: overridden.Replaces,
EmptyFolders: overridden.EmptyFolders,
Contents: contents,
Conflicts: overridden.Conflicts,
Depends: overridden.Dependencies,
Recommends: overridden.Recommends,
Suggests: overridden.Suggests,
Replaces: overridden.Replaces,
Contents: contents,
Scripts: nfpm.Scripts{
PreInstall: overridden.Scripts.PreInstall,
PostInstall: overridden.Scripts.PostInstall,
Expand Down
1 change: 0 additions & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,6 @@ type NFPMOverridables struct {
Suggests []string `yaml:"suggests,omitempty"`
Conflicts []string `yaml:"conflicts,omitempty"`
Replaces []string `yaml:"replaces,omitempty"`
EmptyFolders []string `yaml:"empty_folders,omitempty"` // deprecated
Contents files.Contents `yaml:"contents,omitempty"`
Scripts NFPMScripts `yaml:"scripts,omitempty"`
RPM NFPMRPM `yaml:"rpm,omitempty"`
Expand Down
9 changes: 5 additions & 4 deletions www/docs/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,13 @@ On [GoReleaser PRO](/pro/) custom variables should now be prefixed with `.Var`.
some_template: 'lala-{{ .Var.foo }}'
```

## Expired deprecation notices

The following options were deprecated in the past and were already removed.

### nfpms.empty_folders

> since 2021-11-14 (v1.0.0)
> since 2021-11-14 (v1.0.0), removed 2022-06-14 (v1.10.0)
nFPM empty folders is now deprecated in favor of a `dir` content type:

Expand All @@ -115,9 +119,6 @@ nFPM empty folders is now deprecated in favor of a `dir` content type:
type: dir
```

## Expired deprecation notices

The following options were deprecated in the past and were already removed.

### builds for windows/arm64

Expand Down

0 comments on commit 2c59b8e

Please sign in to comment.